Skip to content

Commit b522957

Browse files
Many changes to get iOS building
1 parent 6c5d58d commit b522957

File tree

9 files changed

+134
-32
lines changed

9 files changed

+134
-32
lines changed

config/ios.gypi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
'host_sdk%': 'macosx',
77

88
'output_dir': '../ios-bin/<(target_sdk)',
9+
10+
'mac_tools_dir': '$(SOLUTION_DIR)/_build/ios/<(host_sdk)/$(CONFIGURATION)'
911
},
1012

1113
'xcode_config_file': '../version',
1214

1315
'xcode_settings':
1416
{
1517
'SDKROOT': '<(target_sdk)',
18+
'SUPPORTED_PLATFORMS': 'iphoneos iphonesimulator',
1619

1720
'SOLUTION_DIR': '<(DEPTH)',
1821
'SYMROOT': '$(SOLUTION_DIR)/_build/ios/$(SDK_NAME)',
@@ -52,8 +55,12 @@
5255
'lib_suffix': '.dylib',
5356
'ext_suffix': '.so',
5457
'debug_info_suffix': '.dSYM',
58+
59+
'mac_tools_dir': '$(SOLUTION_DIR)/_build/ios/<(host_sdk)/$(CONFIGURATION)'
5560
},
5661

62+
'mac_bundle': 0,
63+
5764
'defines':
5865
[
5966
'_MOBILE',
@@ -125,6 +132,21 @@
125132
],
126133
},
127134
],
135+
[
136+
# If building a host tool, use the OSX settings
137+
'_toolset != "target"',
138+
{
139+
'xcode_settings':
140+
{
141+
'SDKROOT[platform=macosx*]': '<(host_sdk)',
142+
'SUPPORTED_PLATFORMS': 'macosx',
143+
'ARCHS': 'x86_64',
144+
145+
'SYMROOT': '$(SOLUTION_DIR)/_build/ios/<(host_sdk)',
146+
'OBJROOT': '$(SOLUTION_DIR)/_cache/ios/<(host_sdk)',
147+
},
148+
},
149+
],
128150
],
129151
},
130152

engine/kernel-mode-template.gypi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
'conditions':
1212
[
1313
[
14-
# Only the Linux and Android builds support proper cross-compilation
15-
'OS == "linux" or OS == "android"',
14+
'cross_compile != 0',
1615
{
1716
'dependencies':
1817
[

libfoundation/libfoundation.gyp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
'toolsets': ['host','target'],
1414

15+
'product_name': 'libFoundation',
16+
1517
'dependencies':
1618
[
1719
'../prebuilt/libicu.gyp:libicu',
@@ -127,6 +129,16 @@
127129
],
128130
},
129131

132+
'target_conditions':
133+
[
134+
[
135+
'_toolset != "target"',
136+
{
137+
'product_name': 'libFoundation->(_toolset)',
138+
},
139+
],
140+
],
141+
130142
'link_settings':
131143
{
132144
'conditions':

libscript/libscript.gyp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636

3737
'toolsets': ['host','target'],
3838

39+
'product_name': 'libScript',
40+
3941
'dependencies':
4042
[
4143
'../libfoundation/libfoundation.gyp:libFoundation',
@@ -78,13 +80,25 @@
7880
},
7981
],
8082
],
83+
84+
'target_conditions':
85+
[
86+
[
87+
'_toolset != "target"',
88+
{
89+
'product_name': 'libScript->(_toolset)',
90+
},
91+
],
92+
],
8193
},
8294
{
8395
'target_name': 'stdscript',
8496
'type': 'static_library',
8597

8698
'toolsets': ['host','target'],
8799

100+
'product_name': 'stdscript',
101+
88102
'dependencies':
89103
[
90104
'libScript',
@@ -101,6 +115,16 @@
101115
[
102116
'<@(stdscript_sources)',
103117
],
118+
119+
'target_conditions':
120+
[
121+
[
122+
'_toolset != "target"',
123+
{
124+
'product_name': 'stdscript->(_toolset)',
125+
},
126+
],
127+
],
104128
},
105129
],
106130
}

toolchain/gentle/gentle/grts.gyp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,22 @@
1414

1515
'suppress_warnings': 1,
1616

17+
'product_name': 'grts',
18+
1719
'sources':
1820
[
1921
'grts.c',
2022
],
23+
24+
'target_conditions':
25+
[
26+
[
27+
'_toolset != "target"',
28+
{
29+
'product_name': 'grts->(_toolset)',
30+
},
31+
],
32+
],
2133
},
2234
],
2335
}

toolchain/lc-compile/lc-compile.gyp

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,32 @@
3636
'dependencies':
3737
[
3838
'src/lc-compile-bootstrap.gyp:lc-compile-stage3#host',
39-
'src/lc-compile-bootstrap.gyp:lc-compile-stage4#target',
39+
],
40+
41+
'conditions':
42+
[
43+
[
44+
'mobile == 0',
45+
{
46+
'dependencies':
47+
[
48+
'src/lc-compile-bootstrap.gyp:lc-compile-stage4#target',
49+
],
50+
},
51+
],
52+
[
53+
'OS == "ios"',
54+
{
55+
'direct_dependent_settings':
56+
{
57+
'variables':
58+
{
59+
# Work-around for Xcode/Gyp impedance mismatch
60+
'lc-compile_host': '<(mac_tools_dir)/lc-compile-stage3-host',
61+
},
62+
},
63+
},
64+
],
4065
],
4166

4267
'direct_dependent_settings':

toolchain/toolchain.gyp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,19 @@
1313
'dependencies':
1414
[
1515
'lc-compile/lc-compile.gyp:lc-compile',
16-
'lc-compile/lc-run.gyp:lc-run',
16+
],
17+
18+
'conditions':
19+
[
20+
[
21+
'mobile == 0',
22+
{
23+
'dependencies':
24+
[
25+
'lc-compile/lc-run.gyp:lc-run',
26+
],
27+
},
28+
],
1729
],
1830
},
1931
],

util/build_libinfo.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ sub trim
9696
output " __libexports";
9797
output "};";
9898
output "LibInfo *__libinfoptr_$name __attribute__((__visibility__(\"default\"))) = &__libinfo;";
99-
output "}"
99+
output "}";
100100

101101
sub output
102102
{

util/perfect/perfect.gyp

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@
1010
'target_name': 'perfect',
1111
'type': 'executable',
1212

13-
'conditions':
13+
'toolsets': ['target','host'],
14+
15+
'product_name': 'perfect',
16+
17+
'target_conditions':
1418
[
1519
[
16-
'OS == "linux" or OS == "android"',
20+
'_toolset != "target"',
1721
{
18-
'toolsets': ['host'],
22+
'product_name': 'perfect->(_toolset)',
1923
},
2024
],
2125
],
@@ -33,37 +37,29 @@
3337
},
3438
},
3539

36-
'xcode_settings':
37-
{
38-
'conditions':
39-
[
40-
[
41-
'OS == "mac" or OS == "ios"',
42-
{
43-
'SDKROOT': '<(host_sdk)',
44-
'ARCHS': '<(host_arch)',
45-
},
46-
],
47-
[
48-
# FIXME Force the perfect executable to be put into
49-
# the target SDK's output directory, so that it
50-
# appears in the PRODUCT_DIR when building against
51-
# the target SDK
52-
'OS == "ios"',
53-
{
54-
'SYMROOT': '$(SOLUTION_DIR)/_build/ios/<(target_sdk)',
55-
},
56-
],
57-
],
58-
},
59-
6040
'direct_dependent_settings':
6141
{
6242
'variables':
6343
{
6444
'perfect_path': '<(PRODUCT_DIR)/perfect<(EXECUTABLE_SUFFIX)',
6545
},
6646
},
47+
48+
'conditions':
49+
[
50+
[
51+
'OS == "ios"',
52+
{
53+
'direct_dependent_settings':
54+
{
55+
'variables':
56+
{
57+
'perfect_path': '<(mac_tools_dir)/perfect-host',
58+
},
59+
},
60+
},
61+
],
62+
],
6763
},
6864
],
6965
}

0 commit comments

Comments
 (0)