File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -113,16 +113,8 @@ def BuildCrubit(gcc_toolchain_path):
113
113
gcc_toolchain_flag = (f'--gcc-toolchain={ gcc_toolchain_path } '
114
114
if gcc_toolchain_path else '' )
115
115
env ["BAZEL_CXXOPTS" ] = gcc_toolchain_flag
116
- env ["BAZEL_LINKOPTS" ] = gcc_toolchain_flag
117
- # TODO(https://crbug.com/1338217): Link C++ stdlib *statically*.
118
- # Things tried so far:
119
- # - Attempts that result in a sefgault when compiling Rust rlib ...
120
- # 1a. env["BAZEL_LINKOPTS"] = f"{gcc_toolchain_flag}:-static"
121
- # 1b. extra_args += ["--features=fully_static_link"]
122
- # # Optionally: extra_args += ["--sandbox_debug"]
123
- # - Attempts that don't have any effect (`ldd ... rs_bindings_from_cc_impl`
124
- # still shows `libstdc++.so.6 => ...`):
125
- # 2. extra_args += ["--dynamic_mode=off"]
116
+ env ["BAZEL_LINKOPTS" ] = f"{ gcc_toolchain_flag } :-static-libstdc++"
117
+ env ["BAZEL_LINKLIBS" ] = f"{ gcc_toolchain_path } /lib64/libstdc++.a:-lm"
126
118
127
119
# Run bazel build ...
128
120
args = [BAZEL_EXE , "build" , "rs_bindings_from_cc:rs_bindings_from_cc_impl" ]
You can’t perform that action at this time.
0 commit comments