Skip to content

Instantly share code, notes, and snippets.

@xldrx
Created November 8, 2017 22:47
Show Gist options
  • Save xldrx/9c75fbecac699a160042f2b9784ed2ab to your computer and use it in GitHub Desktop.
Save xldrx/9c75fbecac699a160042f2b9784ed2ab to your computer and use it in GitHub Desktop.
Patch Bazel to Work on Blue Waters
--- tools/cpp/CROSSTOOL 1980-01-01 00:00:00.000000000 -0600
+++ tools/cpp/CROSSTOOL 2017-09-27 02:34:03.000000000 -0500
@@ -106,22 +106,21 @@
toolchain_identifier: "local_linux"
tool_path { name: "ar" path: "/usr/bin/ar" }
- tool_path { name: "compat-ld" path: "/usr/bin/ld" }
- tool_path { name: "cpp" path: "/usr/bin/cpp" }
+ tool_path { name: "compat-ld" path: "/opt/xalt/0.7.6/sles11.3/bin/ld" }
+ tool_path { name: "cpp" path: "/opt/gcc/6.3.0/bin/g++" }
tool_path { name: "dwp" path: "/usr/bin/dwp" }
- tool_path { name: "gcc" path: "/usr/bin/gcc" }
- cxx_flag: "-std=c++0x"
+ tool_path { name: "gcc" path: "/opt/gcc/6.3.0/bin/gcc" }
+ cxx_flag: "-std=c++11 -I/opt/cray/xe-sysroot/5.2.82/usr/include/"
linker_flag: "-lstdc++"
- linker_flag: "-B/usr/bin/"
+ linker_flag: "-B/opt/gcc/6.3.0/bin/"
# TODO(bazel-team): In theory, the path here ought to exactly match the path
# used by gcc. That works because bazel currently doesn't track files at
# absolute locations and has no remote execution, yet. However, this will need
# to be fixed, maybe with auto-detection?
- cxx_builtin_include_directory: "/usr/lib/gcc/"
- cxx_builtin_include_directory: "/usr/local/include"
- cxx_builtin_include_directory: "/usr/include"
- tool_path { name: "gcov" path: "/usr/bin/gcov" }
+ cxx_builtin_include_directory: "/opt/gcc/6.3.0/snos/include/g++"
+ cxx_builtin_include_directory: "/opt/cray/xe-sysroot/5.2.82/usr/include/"
+ tool_path { name: "gcov" path: "/opt/gcc/6.3.0/bin/gcov" }
# C(++) compiles invoke the compiler (as that is the one knowing where
# to find libraries), but we provide LD so other rules can invoke the linker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment