Skip to content

Commit

Permalink
❄️ Update flake (#182)
Browse files Browse the repository at this point in the history
Notably, bump RBE toolchains to use Clang 16.0.6 and CUDA 12.2.0.
  • Loading branch information
aaronmondal authored Jul 14, 2023
1 parent 8f32587 commit 7237a97
Show file tree
Hide file tree
Showing 14 changed files with 2,571 additions and 2,560 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use flake
use flake --impure
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
${{ runner.os }}-nix-
- name: Run pre-commit hooks
run: |
nix --store ~/nix flake check -L
nix --store ~/nix flake check --impure -L
6 changes: 3 additions & 3 deletions bazel-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ LL_AMD_RPATHS=${(pkgs.lib.concatStringsSep ":" [
${pkgs.lib.strings.optionalString unfree ''
# Flags for CUDA dependencies.
LL_CUDA_TOOLKIT=${pkgsUnfree.cudaPackages_12.cudatoolkit}
LL_CUDA_RUNTIME=${pkgsUnfree.cudaPackages_12.cudatoolkit.lib}
LL_CUDA_DRIVER=${pkgsUnfree.linuxPackages_6_1.nvidia_x11}
LL_CUDA_TOOLKIT=${pkgsUnfree.cudaPackages_12_2.cudatoolkit}
LL_CUDA_RUNTIME=${pkgsUnfree.cudaPackages_12_2.cudatoolkit.lib}
# LL_CUDA_DRIVER=${pkgsUnfree.linuxPackages_6_1.nvidia_x11}
''}
# Only used by rules_cc
BAZEL_CXXOPTS=${pkgs.lib.concatStringsSep ":" [
Expand Down
2 changes: 1 addition & 1 deletion examples/.envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use flake
use flake --impure
2 changes: 1 addition & 1 deletion examples/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bazel_dep(name="rules_ll", version="20230411.0")
local_path_override(module_name = "rules_ll", path = "..")

bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "bazel_skylib", version = "1.4.2")
42 changes: 21 additions & 21 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions ll/args.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,17 @@ def link_executable_args(ctx, in_files, out_file, mode):
format = "-L%s/lib",
)

# TODO: Not pretty. With the right nix packages we can probably
# do this more elegantly.
args.add(
ctx.configuration.default_shell_env[location],
format = "-rpath=%s/lib/stubs",
)
args.add(
ctx.configuration.default_shell_env[location],
format = "-L%s/lib/stubs",
)

args.add("-lcuda")
args.add("-lcudart_static")
args.add("-lcupti_static")
Expand Down
42 changes: 21 additions & 21 deletions rbe/default/cc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -92,29 +92,29 @@ cc_toolchain_config(
coverage_link_flags = ["--coverage"],
cpu = "k8",
cxx_builtin_include_directories = [
"/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/resource-root/include",
"/nix/store/i29k9pvl90385mpsavifqvm4rag684dn-glibc-2.37-8-dev/include",
"/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/resource-root/share",
"/nix/store/1lq568401wff9pi464jkc4d471la2n9x-libcxx-16.0.1-dev/include/c++/v1",
"/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/resource-root/include",
"/nix/store/9bldnbh7kcxyq8y0g1bifd5ywz7m3bq9-glibc-2.37-8-dev/include",
"/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/resource-root/share",
"/nix/store/qp7k02y44y1rfp7c79vp6rgilmh65687-libcxx-16.0.6-dev/include/c++/v1",
],
cxx_flags = [
"-std=c++17",
"-O3",
"-nostdinc++",
"-nostdlib++",
"-isystem/nix/store/1lq568401wff9pi464jkc4d471la2n9x-libcxx-16.0.1-dev/include/c++/v1",
"-isystem/nix/store/qp7k02y44y1rfp7c79vp6rgilmh65687-libcxx-16.0.6-dev/include/c++/v1",
],
dbg_compile_flags = ["-g"],
host_system_name = "x86_64-unknown-linux-gnu",
link_flags = [
"-fuse-ld=/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/ld.gold",
"-fuse-ld=/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/ld.gold",
"-Wl,-no-as-needed",
"-Wl,-z,relro,-z,now",
"-B/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin",
"-L/nix/store/an63vgbpkpflnfssji499z8sx00q8c3j-libcxx-16.0.1/lib",
"-L/nix/store/k5n945r7pasypbjawpwvwiz9a7403blk-libcxxabi-16.0.1/lib",
"-B/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin",
"-L/nix/store/fmls3ywyy70xycsf14gazhnaj3bw8vc6-libcxx-16.0.6/lib",
"-L/nix/store/hyc0xcrwx3xnv5y0sc8654iv75v0w0vj-libcxxabi-16.0.6/lib",
"-lc++",
"-Wl,-rpath,/nix/store/an63vgbpkpflnfssji499z8sx00q8c3j-libcxx-16.0.1/lib,-rpath,/nix/store/k5n945r7pasypbjawpwvwiz9a7403blk-libcxxabi-16.0.1/lib,-rpath,/nix/store/flf14c3ibr83jsa070j25hg5gjapydhl-glibc-2.37-8/lib",
"-Wl,-rpath,/nix/store/fmls3ywyy70xycsf14gazhnaj3bw8vc6-libcxx-16.0.6/lib,-rpath,/nix/store/hyc0xcrwx3xnv5y0sc8654iv75v0w0vj-libcxxabi-16.0.6/lib,-rpath,/nix/store/3n58xw4373jp0ljirf06d8077j15pc4j-glibc-2.37-8/lib",
],
link_libs = [
"-lstdc++",
Expand All @@ -133,18 +133,18 @@ cc_toolchain_config(
target_libc = "glibc_2.35",
target_system_name = "local",
tool_paths = {
"ar": "/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/ar",
"ld": "/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/ld",
"llvm-cov": "/nix/store/fbjmhzla03x90pas46kzciabminlrgxw-llvm-16.0.1/bin/llvm-cov",
"llvm-profdata": "/nix/store/fbjmhzla03x90pas46kzciabminlrgxw-llvm-16.0.1/bin/llvm-profdata",
"cpp": "/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/cpp",
"gcc": "/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/clang",
"dwp": "/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/dwp",
"ar": "/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/ar",
"ld": "/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/ld",
"llvm-cov": "/nix/store/hc9gdv2lqk9qw9ca1c0yn5cs9gb571kb-llvm-16.0.6/bin/llvm-cov",
"llvm-profdata": "/nix/store/hc9gdv2lqk9qw9ca1c0yn5cs9gb571kb-llvm-16.0.6/bin/llvm-profdata",
"cpp": "/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/cpp",
"gcc": "/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/clang",
"dwp": "/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/dwp",
"gcov": "None",
"nm": "/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/nm",
"objcopy": "/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/objcopy",
"objdump": "/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/objdump",
"strip": "/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/strip",
"nm": "/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/nm",
"objcopy": "/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/objcopy",
"objdump": "/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/objdump",
"strip": "/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/strip",
},
toolchain_identifier = "local",
unfiltered_compile_flags = [
Expand Down
10 changes: 5 additions & 5 deletions rbe/default/cc/builtin_include_directory_paths
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
This file is generated by cc_configure and contains builtin include directories
that /nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/clang reported. This file is a dependency of every compilation action and
that /nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/clang reported. This file is a dependency of every compilation action and
changes to it will be reflected in the action cache key. When some of these
paths change, Bazel will make sure to rerun the action, even though none of
declared action inputs or the action commandline changes.

/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/resource-root/include
/nix/store/i29k9pvl90385mpsavifqvm4rag684dn-glibc-2.37-8-dev/include
/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/resource-root/share
/nix/store/1lq568401wff9pi464jkc4d471la2n9x-libcxx-16.0.1-dev/include/c++/v1
/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/resource-root/include
/nix/store/9bldnbh7kcxyq8y0g1bifd5ywz7m3bq9-glibc-2.37-8-dev/include
/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/resource-root/share
/nix/store/qp7k02y44y1rfp7c79vp6rgilmh65687-libcxx-16.0.6-dev/include/c++/v1
4 changes: 2 additions & 2 deletions rbe/default/cc/cc_wrapper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/nix/store/xfb3ykw9r5hpayd05sr0cizwadzq1d8q-bash-5.2-p15/bin/bash
#!/nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/bash
#
# Copyright 2015 The Bazel Authors. All rights reserved.
#
Expand All @@ -22,4 +22,4 @@ set -eu


# Call the C++ compiler
/nix/store/j72jba4hij4kv46pnf7rw76jal2rj283-clang-wrapper-16.0.1/bin/clang "$@"
/nix/store/whzffqb6y92zwfdvxzplyh9z4ry0hjc5-clang-wrapper-16.0.6/bin/clang "$@"
Loading

0 comments on commit 7237a97

Please sign in to comment.