Skip to content

Commit

Permalink
Use LLD-16 as the linker when building.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 533541073
  • Loading branch information
BrianWieder authored and tensorflower-gardener committed May 19, 2023
1 parent 6549aa2 commit 722817e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -23,6 +23,10 @@ build --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
# Target the AVX instruction set
build --copt=-mavx --host_copt=-mavx

# Use lld as the linker
build --linkopt="-fuse-ld=lld"
build --linkopt="-lm"

# Disable clang extention that rejects type definitions within offsetof.
# This was added in clang-16 by https://reviews.llvm.org/D133574.
# Can be removed once upb is updated, since a type definition is used within
Expand Down
Expand Up @@ -30,6 +30,10 @@ build --copt=-mavx --host_copt=-mavx
# See https://github.com/protocolbuffers/upb/blob/9effcbcb27f0a665f9f345030188c0b291e32482/upb/upb.c#L183.
build --copt=-Wno-gnu-offsetof-extensions

# Use lld as the linker
build --linkopt="-fuse-ld=lld"
build --linkopt="-lm"

# Store performance profiling log in the mounted artifact directory.
# The profile can be viewed by visiting chrome://tracing in a Chrome browser.
# See https://docs.bazel.build/versions/main/skylark/performance.html#performance-profiling
Expand Down

0 comments on commit 722817e

Please sign in to comment.