From dc176903da9e84680a1cb2d19b469562e76e570f Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 20 Sep 2017 22:00:15 +0200 Subject: This time for sure: stop using --undefined dynamic_lookup in osx linking. For the time being, all C++ links will provide ObjC core libraries on the command line, via having the link actions imply 'contains_objc_sources', which is a built-in feature that is in the process of being enabled automatically when objective-C/C++ sources are involved in the build. Once that happens, the 'imply' directives will be removed. RELNOTES: Stop using --undefined dynamic_lookup in Apple links. Enables unresolved symbol errors. PiperOrigin-RevId: 169437020 --- .../build/lib/packages/util/MOCK_OSX_CROSSTOOL | 63 +---- tools/osx/crosstool/CROSSTOOL.tpl | 287 +++++++++++++++++---- 2 files changed, 235 insertions(+), 115 deletions(-) diff --git a/src/test/java/com/google/devtools/build/lib/packages/util/MOCK_OSX_CROSSTOOL b/src/test/java/com/google/devtools/build/lib/packages/util/MOCK_OSX_CROSSTOOL index 451a178747..7aedc55922 100644 --- a/src/test/java/com/google/devtools/build/lib/packages/util/MOCK_OSX_CROSSTOOL +++ b/src/test/java/com/google/devtools/build/lib/packages/util/MOCK_OSX_CROSSTOOL @@ -137,9 +137,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -1121,8 +1118,6 @@ toolchain { action: "c++-link-executable" action: "c++-link-dynamic-library" flag_group { - flag: "-undefined" - flag: "dynamic_lookup" } } } @@ -1867,6 +1862,8 @@ toolchain { } linking_mode_flags { mode: DYNAMIC + linker_flag: "-undefined" + linker_flag: "dynamic_lookup" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -2849,8 +2846,6 @@ toolchain { action: "c++-link-executable" action: "c++-link-dynamic-library" flag_group { - flag: "-undefined" - flag: "dynamic_lookup" } } } @@ -3593,9 +3588,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -4577,8 +4569,6 @@ toolchain { action: "c++-link-executable" action: "c++-link-dynamic-library" flag_group { - flag: "-undefined" - flag: "dynamic_lookup" } } } @@ -5321,9 +5311,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -6305,8 +6292,6 @@ toolchain { action: "c++-link-executable" action: "c++-link-dynamic-library" flag_group { - flag: "-undefined" - flag: "dynamic_lookup" } } } @@ -7051,9 +7036,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -8037,8 +8019,6 @@ toolchain { action: "c++-link-executable" action: "c++-link-dynamic-library" flag_group { - flag: "-undefined" - flag: "dynamic_lookup" } } } @@ -8789,9 +8769,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -9777,8 +9754,6 @@ toolchain { action: "c++-link-executable" action: "c++-link-dynamic-library" flag_group { - flag: "-undefined" - flag: "dynamic_lookup" } } } @@ -10530,9 +10505,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -11517,8 +11489,6 @@ toolchain { action: "c++-link-dynamic-library" flag_group { flag: "-lc++" - flag: "-undefined" - flag: "dynamic_lookup" flag: "-target" flag: "x86_64-apple-tvos" } @@ -11528,8 +11498,6 @@ toolchain { action: "c++-link-dynamic-library" flag_group { flag: "-lc++" - flag: "-undefined" - flag: "dynamic_lookup" flag: "-target" flag: "x86_64-apple-tvos" } @@ -12301,9 +12269,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -13287,8 +13252,6 @@ toolchain { action: "c++-link-executable" action: "c++-link-dynamic-library" flag_group { - flag: "-undefined" - flag: "dynamic_lookup" } } } @@ -14039,9 +14002,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -15025,8 +14985,6 @@ toolchain { action: "c++-link-executable" action: "c++-link-dynamic-library" flag_group { - flag: "-undefined" - flag: "dynamic_lookup" } } } @@ -15797,9 +15755,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -16785,8 +16740,6 @@ toolchain { action: "c++-link-executable" action: "c++-link-dynamic-library" flag_group { - flag: "-undefined" - flag: "dynamic_lookup" } } } @@ -17558,9 +17511,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -18545,8 +18495,6 @@ toolchain { action: "c++-link-dynamic-library" flag_group { flag: "-lc++" - flag: "-undefined" - flag: "dynamic_lookup" flag: "-target" flag: "arm64-apple-tvos" } @@ -18556,8 +18504,6 @@ toolchain { action: "c++-link-dynamic-library" flag_group { flag: "-lc++" - flag: "-undefined" - flag: "dynamic_lookup" flag: "-target" flag: "arm64-apple-tvos" } @@ -19349,9 +19295,6 @@ toolchain { compiler_flag: "-g" compiler_flag: "-DDEBUG" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -20335,8 +20278,6 @@ toolchain { action: "c++-link-executable" action: "c++-link-dynamic-library" flag_group { - flag: "-undefined" - flag: "dynamic_lookup" } } } diff --git a/tools/osx/crosstool/CROSSTOOL.tpl b/tools/osx/crosstool/CROSSTOOL.tpl index 8abffa5cd7..e2193ddbe5 100644 --- a/tools/osx/crosstool/CROSSTOOL.tpl +++ b/tools/osx/crosstool/CROSSTOOL.tpl @@ -118,9 +118,8 @@ toolchain { compiler_flag: "-Wself-assign" compiler_flag: "-fno-omit-frame-pointer" cxx_flag: "-std=c++11" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" linker_flag: "-headerpad_max_install_names" + linker_flag: "-lc++" linker_flag: "-no-canonical-prefixes" objcopy_embed_flag: "-I" objcopy_embed_flag: "binary" @@ -144,6 +143,8 @@ toolchain { } linking_mode_flags { mode: DYNAMIC + linker_flag: "-undefined" + linker_flag: "dynamic_lookup" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -204,6 +205,17 @@ toolchain { expand_if_all_available: "legacy_compile_flags" } } + feature { + name: "contains_objc_source" + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fobjc-link-runtime" + } + } + } feature { name: "objc_actions" implies: "objc-compile" @@ -1505,6 +1517,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "symbol_counts" implies: "linkstamps" implies: "output_execpath_flags_executable" @@ -1526,6 +1539,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "has_configured_linker_path" implies: "symbol_counts" implies: "shared_flag" @@ -1604,6 +1618,7 @@ toolchain { tool_path: "wrapped_clang" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "strip_debug_symbols" implies: "apple_env" } @@ -1704,9 +1719,8 @@ toolchain { compiler_flag: "-Wself-assign" compiler_flag: "-fno-omit-frame-pointer" cxx_flag: "-std=c++11" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" linker_flag: "-headerpad_max_install_names" + linker_flag: "-lc++" linker_flag: "-no-canonical-prefixes" linker_flag: "-target" linker_flag: "x86_64-apple-ios" @@ -1730,9 +1744,6 @@ toolchain { mode: DBG compiler_flag: "-g" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -1794,6 +1805,26 @@ toolchain { expand_if_all_available: "legacy_compile_flags" } } + feature { + name: "contains_objc_source" + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fobjc-link-runtime" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-framework" + flag: "UIKit" + } + } + } feature { name: "objc_actions" implies: "objc-compile" @@ -3102,6 +3133,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "symbol_counts" implies: "linkstamps" implies: "output_execpath_flags_executable" @@ -3123,6 +3155,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "has_configured_linker_path" implies: "symbol_counts" implies: "shared_flag" @@ -3201,6 +3234,7 @@ toolchain { tool_path: "wrapped_clang" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "strip_debug_symbols" implies: "apple_env" } @@ -3301,9 +3335,8 @@ toolchain { compiler_flag: "-Wself-assign" compiler_flag: "-fno-omit-frame-pointer" cxx_flag: "-std=c++11" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" linker_flag: "-headerpad_max_install_names" + linker_flag: "-lc++" linker_flag: "-no-canonical-prefixes" linker_flag: "-target" linker_flag: "i386-apple-ios" @@ -3327,9 +3360,6 @@ toolchain { mode: DBG compiler_flag: "-g" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -3391,6 +3421,26 @@ toolchain { expand_if_all_available: "legacy_compile_flags" } } + feature { + name: "contains_objc_source" + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fobjc-link-runtime" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-framework" + flag: "UIKit" + } + } + } feature { name: "objc_actions" implies: "objc-compile" @@ -4701,6 +4751,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "symbol_counts" implies: "linkstamps" implies: "output_execpath_flags_executable" @@ -4722,6 +4773,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "has_configured_linker_path" implies: "symbol_counts" implies: "shared_flag" @@ -4800,6 +4852,7 @@ toolchain { tool_path: "wrapped_clang" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "strip_debug_symbols" implies: "apple_env" } @@ -4900,9 +4953,8 @@ toolchain { compiler_flag: "-Wself-assign" compiler_flag: "-fno-omit-frame-pointer" cxx_flag: "-std=c++11" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" linker_flag: "-headerpad_max_install_names" + linker_flag: "-lc++" linker_flag: "-no-canonical-prefixes" linker_flag: "-target" linker_flag: "x86_64-apple-tvos" @@ -4927,9 +4979,6 @@ toolchain { mode: DBG compiler_flag: "-g" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -4991,6 +5040,26 @@ toolchain { expand_if_all_available: "legacy_compile_flags" } } + feature { + name: "contains_objc_source" + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fobjc-link-runtime" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-framework" + flag: "UIKit" + } + } + } feature { name: "objc_actions" implies: "objc-compile" @@ -5831,8 +5900,6 @@ toolchain { action: "c++-link-dynamic-library" flag_group { flag: "-lc++" - flag: "-undefined" - flag: "dynamic_lookup" flag: "-target" flag: "x86_64-apple-tvos" } @@ -6329,6 +6396,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "symbol_counts" implies: "linkstamps" implies: "output_execpath_flags_executable" @@ -6351,6 +6419,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "has_configured_linker_path" implies: "symbol_counts" implies: "shared_flag" @@ -6430,6 +6499,7 @@ toolchain { tool_path: "wrapped_clang" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "strip_debug_symbols" implies: "apple_env" } @@ -6530,9 +6600,8 @@ toolchain { compiler_flag: "-Wself-assign" compiler_flag: "-fno-omit-frame-pointer" cxx_flag: "-std=c++11" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" linker_flag: "-headerpad_max_install_names" + linker_flag: "-lc++" linker_flag: "-no-canonical-prefixes" linker_flag: "-target" linker_flag: "i386-apple-ios" @@ -6556,9 +6625,6 @@ toolchain { mode: DBG compiler_flag: "-g" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -6620,6 +6686,26 @@ toolchain { expand_if_all_available: "legacy_compile_flags" } } + feature { + name: "contains_objc_source" + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fobjc-link-runtime" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-framework" + flag: "UIKit" + } + } + } feature { name: "objc_actions" implies: "objc-compile" @@ -7928,6 +8014,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "symbol_counts" implies: "linkstamps" implies: "output_execpath_flags_executable" @@ -7949,6 +8036,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "has_configured_linker_path" implies: "symbol_counts" implies: "shared_flag" @@ -8027,6 +8115,7 @@ toolchain { tool_path: "wrapped_clang" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "strip_debug_symbols" implies: "apple_env" } @@ -8127,9 +8216,8 @@ toolchain { compiler_flag: "-Wself-assign" compiler_flag: "-fno-omit-frame-pointer" cxx_flag: "-std=c++11" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" linker_flag: "-headerpad_max_install_names" + linker_flag: "-lc++" linker_flag: "-no-canonical-prefixes" linker_flag: "-target" linker_flag: "armv7-apple-ios" @@ -8153,9 +8241,6 @@ toolchain { mode: DBG compiler_flag: "-g" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -8217,6 +8302,26 @@ toolchain { expand_if_all_available: "legacy_compile_flags" } } + feature { + name: "contains_objc_source" + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fobjc-link-runtime" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-framework" + flag: "UIKit" + } + } + } feature { name: "objc_actions" implies: "objc-compile" @@ -9513,6 +9618,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "symbol_counts" implies: "linkstamps" implies: "output_execpath_flags_executable" @@ -9534,6 +9640,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "has_configured_linker_path" implies: "symbol_counts" implies: "shared_flag" @@ -9612,6 +9719,7 @@ toolchain { tool_path: "wrapped_clang" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "strip_debug_symbols" implies: "apple_env" } @@ -9712,9 +9820,8 @@ toolchain { compiler_flag: "-Wself-assign" compiler_flag: "-fno-omit-frame-pointer" cxx_flag: "-std=c++11" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" linker_flag: "-headerpad_max_install_names" + linker_flag: "-lc++" linker_flag: "-no-canonical-prefixes" linker_flag: "-target" linker_flag: "armv7-apple-watchos" @@ -9738,9 +9845,6 @@ toolchain { mode: DBG compiler_flag: "-g" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -9802,6 +9906,26 @@ toolchain { expand_if_all_available: "legacy_compile_flags" } } + feature { + name: "contains_objc_source" + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fobjc-link-runtime" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-framework" + flag: "UIKit" + } + } + } feature { name: "objc_actions" implies: "objc-compile" @@ -11100,6 +11224,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "symbol_counts" implies: "linkstamps" implies: "output_execpath_flags_executable" @@ -11121,6 +11246,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "has_configured_linker_path" implies: "symbol_counts" implies: "shared_flag" @@ -11199,6 +11325,7 @@ toolchain { tool_path: "wrapped_clang" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "strip_debug_symbols" implies: "apple_env" } @@ -11299,9 +11426,8 @@ toolchain { compiler_flag: "-Wself-assign" compiler_flag: "-fno-omit-frame-pointer" cxx_flag: "-std=c++11" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" linker_flag: "-headerpad_max_install_names" + linker_flag: "-lc++" linker_flag: "-no-canonical-prefixes" linker_flag: "-target" linker_flag: "arm64-apple-tvos" @@ -11326,9 +11452,6 @@ toolchain { mode: DBG compiler_flag: "-g" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -11390,6 +11513,26 @@ toolchain { expand_if_all_available: "legacy_compile_flags" } } + feature { + name: "contains_objc_source" + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fobjc-link-runtime" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-framework" + flag: "UIKit" + } + } + } feature { name: "objc_actions" implies: "objc-compile" @@ -12230,8 +12373,6 @@ toolchain { action: "c++-link-dynamic-library" flag_group { flag: "-lc++" - flag: "-undefined" - flag: "dynamic_lookup" flag: "-target" flag: "arm64-apple-tvos" } @@ -12716,6 +12857,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "symbol_counts" implies: "linkstamps" implies: "output_execpath_flags_executable" @@ -12738,6 +12880,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "has_configured_linker_path" implies: "symbol_counts" implies: "shared_flag" @@ -12817,6 +12960,7 @@ toolchain { tool_path: "wrapped_clang" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "strip_debug_symbols" implies: "apple_env" } @@ -12917,9 +13061,8 @@ toolchain { compiler_flag: "-Wself-assign" compiler_flag: "-fno-omit-frame-pointer" cxx_flag: "-std=c++11" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" linker_flag: "-headerpad_max_install_names" + linker_flag: "-lc++" linker_flag: "-no-canonical-prefixes" linker_flag: "-target" linker_flag: "arm64-apple-ios" @@ -12943,9 +13086,6 @@ toolchain { mode: DBG compiler_flag: "-g" } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -13007,6 +13147,26 @@ toolchain { expand_if_all_available: "legacy_compile_flags" } } + feature { + name: "contains_objc_source" + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fobjc-link-runtime" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-framework" + flag: "UIKit" + } + } + } feature { name: "objc_actions" implies: "objc-compile" @@ -14303,6 +14463,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "symbol_counts" implies: "linkstamps" implies: "output_execpath_flags_executable" @@ -14324,6 +14485,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "has_configured_linker_path" implies: "symbol_counts" implies: "shared_flag" @@ -14402,6 +14564,7 @@ toolchain { tool_path: "wrapped_clang" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "strip_debug_symbols" implies: "apple_env" } @@ -14503,9 +14666,8 @@ toolchain { compiler_flag: "-Wself-assign" compiler_flag: "-fno-omit-frame-pointer" cxx_flag: "-std=c++11" - linker_flag: "-undefined" - linker_flag: "dynamic_lookup" linker_flag: "-headerpad_max_install_names" + linker_flag: "-lc++" linker_flag: "-no-canonical-prefixes" objcopy_embed_flag: "-I" objcopy_embed_flag: "binary" @@ -14528,12 +14690,6 @@ toolchain { mode: DBG compiler_flag: "-g" } - linking_mode_flags { - mode: DYNAMIC - } - linking_mode_flags { - mode: DYNAMIC - } make_variable { name: "STACK_FRAME_UNLIMITED" value: "-Wframe-larger-than=100000000 -Wno-vla" @@ -14598,6 +14754,26 @@ toolchain { expand_if_all_available: "legacy_compile_flags" } } + feature { + name: "contains_objc_source" + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-fobjc-link-runtime" + } + } + flag_set { + action: "c++-link-interface-dynamic-library" + action: "c++-link-dynamic-library" + action: "c++-link-executable" + flag_group { + flag: "-framework" + flag: "UIKit" + } + } + } feature { name: "objc_actions" implies: "objc-compile" @@ -15894,6 +16070,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "symbol_counts" implies: "linkstamps" implies: "output_execpath_flags_executable" @@ -15915,6 +16092,7 @@ toolchain { tool_path: "cc_wrapper.sh" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "has_configured_linker_path" implies: "symbol_counts" implies: "shared_flag" @@ -15993,6 +16171,7 @@ toolchain { tool_path: "wrapped_clang" execution_requirement: "requires-darwin" } + implies: "contains_objc_source" implies: "strip_debug_symbols" implies: "apple_env" } -- cgit v1.2.3