aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'third_party')
-rw-r--r--third_party/clang_toolchain/download_clang.bzl8
-rw-r--r--third_party/gpus/crosstool/CROSSTOOL.tpl4
-rw-r--r--third_party/gpus/cuda_configure.bzl13
-rw-r--r--third_party/jpeg/jpeg.BUILD16
4 files changed, 27 insertions, 14 deletions
diff --git a/third_party/clang_toolchain/download_clang.bzl b/third_party/clang_toolchain/download_clang.bzl
index 5ef47cdd0d..e782739661 100644
--- a/third_party/clang_toolchain/download_clang.bzl
+++ b/third_party/clang_toolchain/download_clang.bzl
@@ -39,15 +39,15 @@ def download_clang(repo_ctx, out_folder):
# Latest CLANG_REVISION and CLANG_SUB_REVISION of the Chromiums's release
# can be found in https://chromium.googlesource.com/chromium/src/tools/clang/+/master/scripts/update.py
- CLANG_REVISION = "338452"
+ CLANG_REVISION = "340427"
CLANG_SUB_REVISION = 1
package_version = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION)
checksums = {
- "Linux_x64": "213ba23a0a9855ede5041f66661caa9c5c59a573ec60b82a31839f9a97f397bf",
- "Mac": "4267774201f8cb50c25e081375e87038d58db80064a20a0d9d7fe57ea4357ece",
- "Win": "a8a5d5b25443c099e2c20d1a0cdce2f1d17e2dba84de66a6dc6a239ce3e78c34",
+ "Linux_x64": "8a8f21fb624fc7be7e91e439a13114847185375bb932db51ba590174ecaf764b",
+ "Mac": "ba894536b7c8d37103a5ddba784f268d55e65bb2ea1200a2cf9f2ef1590eaacd",
+ "Win": "c3f5bd977266dfd011411c94a13e00974b643b70fb0225a5fb030f7f703fa474",
}
platform_folder = _get_platform_folder(repo_ctx.os.name)
diff --git a/third_party/gpus/crosstool/CROSSTOOL.tpl b/third_party/gpus/crosstool/CROSSTOOL.tpl
index 3972c96a2f..3189cf8e31 100644
--- a/third_party/gpus/crosstool/CROSSTOOL.tpl
+++ b/third_party/gpus/crosstool/CROSSTOOL.tpl
@@ -208,7 +208,7 @@ toolchain {
action: "c++-link-dynamic-library"
action: "c++-link-nodeps-dynamic-library"
flag_group {
- flag: "-B/usr/bin/"
+ %{linker_bin_path_flag}
}
}
}
@@ -446,7 +446,7 @@ toolchain {
action: "c++-link-dynamic-library"
action: "c++-link-nodeps-dynamic-library"
flag_group {
- flag: "-B/usr/bin/"
+ %{linker_bin_path_flag}
}
}
}
diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl
index f6a39aeaf1..5648b1525a 100644
--- a/third_party/gpus/cuda_configure.bzl
+++ b/third_party/gpus/cuda_configure.bzl
@@ -1303,6 +1303,19 @@ def _create_local_cuda_repository(repository_ctx):
host_compiler_includes = _host_compiler_includes(repository_ctx, cc_fullpath)
cuda_defines = {}
+ # Bazel sets '-B/usr/bin' flag to workaround build errors on RHEL (see
+ # https://github.com/bazelbuild/bazel/issues/760).
+ # However, this stops our custom clang toolchain from picking the provided
+ # LLD linker, so we're only adding '-B/usr/bin' when using non-downloaded
+ # toolchain.
+ # TODO: when bazel stops adding '-B/usr/bin' by default, remove this
+ # flag from the CROSSTOOL completely (see
+ # https://github.com/bazelbuild/bazel/issues/5634)
+ if should_download_clang:
+ cuda_defines["%{linker_bin_path_flag}"] = ""
+ else:
+ cuda_defines["%{linker_bin_path_flag}"] = 'flag: "-B/usr/bin"'
+
if is_cuda_clang:
cuda_defines["%{host_compiler_path}"] = str(cc)
cuda_defines["%{host_compiler_warnings}"] = """
diff --git a/third_party/jpeg/jpeg.BUILD b/third_party/jpeg/jpeg.BUILD
index 946f13de12..5edf4f8120 100644
--- a/third_party/jpeg/jpeg.BUILD
+++ b/third_party/jpeg/jpeg.BUILD
@@ -443,7 +443,7 @@ JCONFIGINT_COMMON_SUBSTITUTIONS = {
JCONFIGINT_NOWIN_SUBSTITUTIONS = {
"#cmakedefine HAVE_BUILTIN_CTZL": "#define HAVE_BUILTIN_CTZL",
- "@INLINE@" : "inline __attribute__((always_inline))",
+ "@INLINE@": "inline __attribute__((always_inline))",
"#define SIZEOF_SIZE_T @SIZE_T@": "#if (__WORDSIZE==64 && !defined(__native_client__))\n" +
"#define SIZEOF_SIZE_T 8\n" +
"#else\n" +
@@ -453,13 +453,13 @@ JCONFIGINT_NOWIN_SUBSTITUTIONS = {
JCONFIGINT_WIN_SUBSTITUTIONS = {
"#cmakedefine HAVE_BUILTIN_CTZL": "",
- "#define INLINE @INLINE@" : "#if defined(__GNUC__)\n" +
- "#define INLINE inline __attribute__((always_inline))\n" +
- "#elif defined(_MSC_VER)\n" +
- "#define INLINE __forceinline\n" +
- "#else\n" +
- "#define INLINE\n" +
- "#endif\n",
+ "#define INLINE @INLINE@": "#if defined(__GNUC__)\n" +
+ "#define INLINE inline __attribute__((always_inline))\n" +
+ "#elif defined(_MSC_VER)\n" +
+ "#define INLINE __forceinline\n" +
+ "#else\n" +
+ "#define INLINE\n" +
+ "#endif\n",
"#define SIZEOF_SIZE_T @SIZE_T@": "#if (__WORDSIZE==64)\n" +
"#define SIZEOF_SIZE_T 8\n" +
"#else\n" +