Skip to content

Commit

Permalink
Windows: remove forced link to clang_rt.builtins
Browse files Browse the repository at this point in the history
When building with `cl`, this library is not linked against.  Replicate
this behaviour with `clang-cl`.  `clang-cl` should not generate
references to the GNU functions by default, so this is generally safe.

Closes bazelbuild#15331.

PiperOrigin-RevId: 503925590
Change-Id: Ib385f85ccb25bfb19c691d13bdf48169efbdfeda
  • Loading branch information
compnerd authored and copybara-github committed Jan 23, 2023
1 parent ff92499 commit 761b280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/cpp/BUILD.windows.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ cc_toolchain_config(
"strip": "wrapper/bin/msvc_nop.bat",
},
archiver_flags = ["/MACHINE:X64"],
default_link_flags = ["/MACHINE:X64", "/DEFAULTLIB:clang_rt.builtins-x86_64.lib"],
default_link_flags = ["/MACHINE:X64"],
dbg_mode_debug_flag = "%{clang_cl_dbg_mode_debug_flag_x64}",
fastbuild_mode_debug_flag = "%{clang_cl_fastbuild_mode_debug_flag_x64}",
)
Expand Down

0 comments on commit 761b280

Please sign in to comment.