diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2016-04-26 08:39:44 +0000 |
---|---|---|
committer | Yun Peng <pcloudy@google.com> | 2016-04-26 14:38:59 +0000 |
commit | 6cab55bd01ed5a4091da2278b8792be5473ce457 (patch) | |
tree | 7b38b1d2bb1f5197817c4c1a59b5ec0e01fa4225 /tools | |
parent | bd69080f0b9d57047d390d9557aa6d0441e66b38 (diff) |
cc_configure.bzl: Add -Wl,-no-as-needed as default link options
--
MOS_MIGRATED_REVID=120791766
Diffstat (limited to 'tools')
-rw-r--r-- | tools/cpp/cc_configure.bzl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl index 27f4089881..430ea73928 100644 --- a/tools/cpp/cc_configure.bzl +++ b/tools/cpp/cc_configure.bzl @@ -172,7 +172,8 @@ def _crosstool_content(repository_ctx, cc, cpu_value, darwin): "linker_flag": [ "-lstdc++", # Anticipated future default. - ] + _add_option_if_supported(repository_ctx, cc, "-no-canonical-prefixes") + ( + ] + _add_option_if_supported(repository_ctx, cc, "-no-canonical-prefixes") + + _add_option_if_supported(repository_ctx, cc, "-Wl,-no-as-needed") + ( ["-undefined", "dynamic_lookup"] if darwin else [ "-B" + str(repository_ctx.path(cc).dirname), # Always have -B/usr/bin, see https://github.com/bazelbuild/bazel/issues/760. |