@@ -94,6 +94,7 @@ cc_toolchain_config(
94
94
#"--ld-path=/opt/x86_64-linux-musl/bin/ld.lld",
95
95
"--ld-path=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ld.lld" ,
96
96
"-stdlib=libstdc++" ,
97
+ "-static-libstdc++" ,
97
98
],
98
99
link_libs = [
99
100
"-lstdc++" ,
@@ -188,6 +189,7 @@ cc_toolchain_config(
188
189
"-isystem /opt/BB_TARGET/BB_TARGET/include/c++/GCC_VERSION/BB_TARGET" ,
189
190
"-isystem /opt/BB_TARGET/BB_TARGET/include/c++/GCC_VERSION/backward" ,
190
191
"-isystem /opt/BB_TARGET/BB_TARGET/include/c++/GCC_VERSION/parallel" ,
192
+ "-stdlib=libstdc++" ,
191
193
],
192
194
compiler = "compiler" ,
193
195
coverage_compile_flags = ["--coverage" ],
@@ -209,7 +211,10 @@ cc_toolchain_config(
209
211
],
210
212
dbg_compile_flags = ["-g" ],
211
213
host_system_name = "linux" ,
212
- link_flags = [],
214
+ link_flags = [
215
+ "-stdlib=libstdc++" ,
216
+ "-static-libstdc++" ,
217
+ ],
213
218
link_libs = [
214
219
"-lstdc++" ,
215
220
"-lm" ,
@@ -221,7 +226,6 @@ cc_toolchain_config(
221
226
"-DNDEBUG" ,
222
227
"-ffunction-sections" ,
223
228
"-fdata-sections" ,
224
- # "-stdlib=libstdc++",
225
229
],
226
230
opt_link_flags = ["-Wl,--gc-sections" ],
227
231
# TODO gcc doesn't support it, only put it on clang (maybe even only for clang on aarch64-darwin?)
@@ -349,7 +353,6 @@ cc_toolchain_config(
349
353
"-DNDEBUG" ,
350
354
"-ffunction-sections" ,
351
355
"-fdata-sections" ,
352
- # "-stdlib=libstdc++",
353
356
],
354
357
opt_link_flags = ["-Wl,--gc-sections" ],
355
358
# TODO gcc doesn't support it, only put it on clang (maybe even only for clang on aarch64-darwin?)
@@ -777,6 +780,7 @@ cc_toolchain_config(
777
780
abi_version = "local" ,
778
781
compile_flags = [
779
782
"-I/usr/include/c++/11" ,
783
+ "-stdlib=libstdc++" ,
780
784
],
781
785
compiler = "clang" ,
782
786
coverage_compile_flags = ["--coverage" ],
@@ -813,7 +817,6 @@ cc_toolchain_config(
813
817
"-DNDEBUG" ,
814
818
"-ffunction-sections" ,
815
819
"-fdata-sections" ,
816
- "-stdlib=libstdc++" ,
817
820
"-I/usr/include/c++/11" ,
818
821
],
819
822
opt_link_flags = ["-Wl,--gc-sections" ],
0 commit comments