Skip to content

Commit dc17690

Browse files
Googlerlaszlocsomor
Googler
authored andcommitted
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
1 parent 3dd22a3 commit dc17690

File tree

2 files changed

+235
-115
lines changed

2 files changed

+235
-115
lines changed

src/test/java/com/google/devtools/build/lib/packages/util/MOCK_OSX_CROSSTOOL

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ toolchain {
137137
compiler_flag: "-g"
138138
compiler_flag: "-DDEBUG"
139139
}
140-
linking_mode_flags {
141-
mode: DYNAMIC
142-
}
143140
make_variable {
144141
name: "STACK_FRAME_UNLIMITED"
145142
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -1121,8 +1118,6 @@ toolchain {
11211118
action: "c++-link-executable"
11221119
action: "c++-link-dynamic-library"
11231120
flag_group {
1124-
flag: "-undefined"
1125-
flag: "dynamic_lookup"
11261121
}
11271122
}
11281123
}
@@ -1867,6 +1862,8 @@ toolchain {
18671862
}
18681863
linking_mode_flags {
18691864
mode: DYNAMIC
1865+
linker_flag: "-undefined"
1866+
linker_flag: "dynamic_lookup"
18701867
}
18711868
make_variable {
18721869
name: "STACK_FRAME_UNLIMITED"
@@ -2849,8 +2846,6 @@ toolchain {
28492846
action: "c++-link-executable"
28502847
action: "c++-link-dynamic-library"
28512848
flag_group {
2852-
flag: "-undefined"
2853-
flag: "dynamic_lookup"
28542849
}
28552850
}
28562851
}
@@ -3593,9 +3588,6 @@ toolchain {
35933588
compiler_flag: "-g"
35943589
compiler_flag: "-DDEBUG"
35953590
}
3596-
linking_mode_flags {
3597-
mode: DYNAMIC
3598-
}
35993591
make_variable {
36003592
name: "STACK_FRAME_UNLIMITED"
36013593
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -4577,8 +4569,6 @@ toolchain {
45774569
action: "c++-link-executable"
45784570
action: "c++-link-dynamic-library"
45794571
flag_group {
4580-
flag: "-undefined"
4581-
flag: "dynamic_lookup"
45824572
}
45834573
}
45844574
}
@@ -5321,9 +5311,6 @@ toolchain {
53215311
compiler_flag: "-g"
53225312
compiler_flag: "-DDEBUG"
53235313
}
5324-
linking_mode_flags {
5325-
mode: DYNAMIC
5326-
}
53275314
make_variable {
53285315
name: "STACK_FRAME_UNLIMITED"
53295316
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -6305,8 +6292,6 @@ toolchain {
63056292
action: "c++-link-executable"
63066293
action: "c++-link-dynamic-library"
63076294
flag_group {
6308-
flag: "-undefined"
6309-
flag: "dynamic_lookup"
63106295
}
63116296
}
63126297
}
@@ -7051,9 +7036,6 @@ toolchain {
70517036
compiler_flag: "-g"
70527037
compiler_flag: "-DDEBUG"
70537038
}
7054-
linking_mode_flags {
7055-
mode: DYNAMIC
7056-
}
70577039
make_variable {
70587040
name: "STACK_FRAME_UNLIMITED"
70597041
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -8037,8 +8019,6 @@ toolchain {
80378019
action: "c++-link-executable"
80388020
action: "c++-link-dynamic-library"
80398021
flag_group {
8040-
flag: "-undefined"
8041-
flag: "dynamic_lookup"
80428022
}
80438023
}
80448024
}
@@ -8789,9 +8769,6 @@ toolchain {
87898769
compiler_flag: "-g"
87908770
compiler_flag: "-DDEBUG"
87918771
}
8792-
linking_mode_flags {
8793-
mode: DYNAMIC
8794-
}
87958772
make_variable {
87968773
name: "STACK_FRAME_UNLIMITED"
87978774
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -9777,8 +9754,6 @@ toolchain {
97779754
action: "c++-link-executable"
97789755
action: "c++-link-dynamic-library"
97799756
flag_group {
9780-
flag: "-undefined"
9781-
flag: "dynamic_lookup"
97829757
}
97839758
}
97849759
}
@@ -10530,9 +10505,6 @@ toolchain {
1053010505
compiler_flag: "-g"
1053110506
compiler_flag: "-DDEBUG"
1053210507
}
10533-
linking_mode_flags {
10534-
mode: DYNAMIC
10535-
}
1053610508
make_variable {
1053710509
name: "STACK_FRAME_UNLIMITED"
1053810510
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -11517,8 +11489,6 @@ toolchain {
1151711489
action: "c++-link-dynamic-library"
1151811490
flag_group {
1151911491
flag: "-lc++"
11520-
flag: "-undefined"
11521-
flag: "dynamic_lookup"
1152211492
flag: "-target"
1152311493
flag: "x86_64-apple-tvos"
1152411494
}
@@ -11528,8 +11498,6 @@ toolchain {
1152811498
action: "c++-link-dynamic-library"
1152911499
flag_group {
1153011500
flag: "-lc++"
11531-
flag: "-undefined"
11532-
flag: "dynamic_lookup"
1153311501
flag: "-target"
1153411502
flag: "x86_64-apple-tvos"
1153511503
}
@@ -12301,9 +12269,6 @@ toolchain {
1230112269
compiler_flag: "-g"
1230212270
compiler_flag: "-DDEBUG"
1230312271
}
12304-
linking_mode_flags {
12305-
mode: DYNAMIC
12306-
}
1230712272
make_variable {
1230812273
name: "STACK_FRAME_UNLIMITED"
1230912274
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -13287,8 +13252,6 @@ toolchain {
1328713252
action: "c++-link-executable"
1328813253
action: "c++-link-dynamic-library"
1328913254
flag_group {
13290-
flag: "-undefined"
13291-
flag: "dynamic_lookup"
1329213255
}
1329313256
}
1329413257
}
@@ -14039,9 +14002,6 @@ toolchain {
1403914002
compiler_flag: "-g"
1404014003
compiler_flag: "-DDEBUG"
1404114004
}
14042-
linking_mode_flags {
14043-
mode: DYNAMIC
14044-
}
1404514005
make_variable {
1404614006
name: "STACK_FRAME_UNLIMITED"
1404714007
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -15025,8 +14985,6 @@ toolchain {
1502514985
action: "c++-link-executable"
1502614986
action: "c++-link-dynamic-library"
1502714987
flag_group {
15028-
flag: "-undefined"
15029-
flag: "dynamic_lookup"
1503014988
}
1503114989
}
1503214990
}
@@ -15797,9 +15755,6 @@ toolchain {
1579715755
compiler_flag: "-g"
1579815756
compiler_flag: "-DDEBUG"
1579915757
}
15800-
linking_mode_flags {
15801-
mode: DYNAMIC
15802-
}
1580315758
make_variable {
1580415759
name: "STACK_FRAME_UNLIMITED"
1580515760
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -16785,8 +16740,6 @@ toolchain {
1678516740
action: "c++-link-executable"
1678616741
action: "c++-link-dynamic-library"
1678716742
flag_group {
16788-
flag: "-undefined"
16789-
flag: "dynamic_lookup"
1679016743
}
1679116744
}
1679216745
}
@@ -17558,9 +17511,6 @@ toolchain {
1755817511
compiler_flag: "-g"
1755917512
compiler_flag: "-DDEBUG"
1756017513
}
17561-
linking_mode_flags {
17562-
mode: DYNAMIC
17563-
}
1756417514
make_variable {
1756517515
name: "STACK_FRAME_UNLIMITED"
1756617516
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -18545,8 +18495,6 @@ toolchain {
1854518495
action: "c++-link-dynamic-library"
1854618496
flag_group {
1854718497
flag: "-lc++"
18548-
flag: "-undefined"
18549-
flag: "dynamic_lookup"
1855018498
flag: "-target"
1855118499
flag: "arm64-apple-tvos"
1855218500
}
@@ -18556,8 +18504,6 @@ toolchain {
1855618504
action: "c++-link-dynamic-library"
1855718505
flag_group {
1855818506
flag: "-lc++"
18559-
flag: "-undefined"
18560-
flag: "dynamic_lookup"
1856118507
flag: "-target"
1856218508
flag: "arm64-apple-tvos"
1856318509
}
@@ -19349,9 +19295,6 @@ toolchain {
1934919295
compiler_flag: "-g"
1935019296
compiler_flag: "-DDEBUG"
1935119297
}
19352-
linking_mode_flags {
19353-
mode: DYNAMIC
19354-
}
1935519298
make_variable {
1935619299
name: "STACK_FRAME_UNLIMITED"
1935719300
value: "-Wframe-larger-than=100000000 -Wno-vla"
@@ -20335,8 +20278,6 @@ toolchain {
2033520278
action: "c++-link-executable"
2033620279
action: "c++-link-dynamic-library"
2033720280
flag_group {
20338-
flag: "-undefined"
20339-
flag: "dynamic_lookup"
2034020281
}
2034120282
}
2034220283
}

0 commit comments

Comments
 (0)