Skip to content

Commit f80a64d

Browse files
BrianWiedertensorflow-jenkins
authored andcommitted
Use LLD-16 as the linker when building.
PiperOrigin-RevId: 533541073
1 parent 1cb1a03 commit f80a64d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tensorflow/tools/tf_sig_build_dockerfiles/devel.usertools/cpu.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ build --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
2323
# Target the AVX instruction set
2424
build --copt=-mavx --host_copt=-mavx
2525

26+
# Use lld as the linker
27+
build --linkopt="-fuse-ld=lld"
28+
build --linkopt="-lm"
29+
2630
# Disable clang extention that rejects type definitions within offsetof.
2731
# This was added in clang-16 by https://reviews.llvm.org/D133574.
2832
# Can be removed once upb is updated, since a type definition is used within

tensorflow/tools/tf_sig_build_dockerfiles/devel.usertools/gpu.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ build --copt=-mavx --host_copt=-mavx
3030
# See https://github.com/protocolbuffers/upb/blob/9effcbcb27f0a665f9f345030188c0b291e32482/upb/upb.c#L183.
3131
build --copt=-Wno-gnu-offsetof-extensions
3232

33+
# Use lld as the linker
34+
build --linkopt="-fuse-ld=lld"
35+
build --linkopt="-lm"
36+
3337
# Store performance profiling log in the mounted artifact directory.
3438
# The profile can be viewed by visiting chrome://tracing in a Chrome browser.
3539
# See https://docs.bazel.build/versions/main/skylark/performance.html#performance-profiling

0 commit comments

Comments
 (0)