diff options
author | 2016-12-22 08:04:06 +0000 | |
---|---|---|
committer | 2016-12-22 09:58:06 +0000 | |
commit | 5374d4fd8ee670b96fe39fe47b04b641c3587342 (patch) | |
tree | 006766b2ccbb32256a0e86df5fa7c4c4c321e1a0 /tools/cpp | |
parent | ac0e4ecd58587b453bdd7a7d76d35eaa0e6b1e20 (diff) |
Move hardcoded -L linker flags to CROSSTOOL
This cl introduces another build variable: library_search_directories, removes
hardcoded -L generation from blaze and updates all the affected crosstools
(those which started using action_configs, because the defaults from
CppLinkActionConfigs are not applied then).
--
PiperOrigin-RevId: 142738674
MOS_MIGRATED_REVID=142738674
Diffstat (limited to 'tools/cpp')
-rw-r--r-- | tools/cpp/CROSSTOOL.tpl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/cpp/CROSSTOOL.tpl b/tools/cpp/CROSSTOOL.tpl index 36a7b1bf20..54caf336a7 100644 --- a/tools/cpp/CROSSTOOL.tpl +++ b/tools/cpp/CROSSTOOL.tpl @@ -440,6 +440,19 @@ toolchain { feature { name: 'input_param_flags' flag_set { + expand_if_all_available: 'library_search_directories' + action: 'c++-link-executable' + action: 'c++-link-dynamic-library' + action: 'c++-link-static-library' + action: 'c++-link-alwayslink-static-library' + action: 'c++-link-pic-static-library' + action: 'c++-link-alwayslink-pic-static-library' + flag_group { + iterate_over: 'library_search_directories' + flag: "-L%{library_search_directories}" + } + } + flag_set { expand_if_all_available: 'libopts' action: 'c++-link-executable' action: 'c++-link-dynamic-library' |