Skip to content

Commit a6091f5

Browse files
chexiongshengRafaelGSS
authored andcommitted
gyp: libnode for ios app embedding
PR-URL: #44210 Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent 4dbe4a0 commit a6091f5

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

configure.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
parser = argparse.ArgumentParser()
4646

4747
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
48-
'android', 'aix', 'cloudabi')
48+
'android', 'aix', 'cloudabi', 'ios')
4949
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
5050
'ppc64', 'x64', 'x86', 'x86_64', 's390x', 'riscv64', 'loong64')
5151
valid_arm_float_abi = ('soft', 'softfp', 'hard')
@@ -2083,7 +2083,7 @@ def make_bin_override():
20832083
gyp_args += ['-Dbuild_type=' + config['BUILDTYPE']]
20842084

20852085
if options.use_ninja:
2086-
gyp_args += ['-f', 'ninja']
2086+
gyp_args += ['-f', 'ninja-' + flavor]
20872087
elif flavor == 'win' and sys.platform != 'msys':
20882088
gyp_args += ['-f', 'msvs', '-G', 'msvs_version=auto']
20892089
else:

deps/cares/cares.gyp

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
'include_dirs': [ 'config/linux' ],
158158
'sources': [ 'config/linux/ares_config.h' ]
159159
}],
160-
[ 'OS=="mac"', {
160+
[ 'OS=="mac" or OS=="ios"', {
161161
'include_dirs': [ 'config/darwin' ],
162162
'sources': [ 'config/darwin/ares_config.h' ]
163163
}],

node.gyp

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
},
229229
},
230230
'conditions': [
231-
['OS != "aix" and OS != "mac"', {
231+
['OS != "aix" and OS != "mac" and OS != "ios"', {
232232
'ldflags': [
233233
'-Wl,--whole-archive',
234234
'<(obj_dir)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)',

node.gypi

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
},
146146
},
147147
'conditions': [
148-
['OS!="aix" and node_shared=="false"', {
148+
['OS!="aix" and OS!="ios" and node_shared=="false"', {
149149
'ldflags': [
150150
'-Wl,--whole-archive',
151151
'<(obj_dir)/deps/zlib/<(STATIC_LIB_PREFIX)zlib<(STATIC_LIB_SUFFIX)',
@@ -184,7 +184,7 @@
184184
},
185185
},
186186
'conditions': [
187-
['OS!="aix" and node_shared=="false"', {
187+
['OS!="aix" and OS!="ios" and node_shared=="false"', {
188188
'ldflags': [
189189
'-Wl,--whole-archive',
190190
'<(obj_dir)/deps/uv/<(STATIC_LIB_PREFIX)uv<(STATIC_LIB_SUFFIX)',

tools/v8_gypfiles/v8.gyp

+11-3
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,8 @@
847847
'conditions': [
848848
['v8_enable_webassembly==1', {
849849
'conditions': [
850-
['OS=="mac" or (_toolset=="host" and host_arch=="x64" and OS=="linux")', {
850+
['OS=="mac" or OS=="ios" or '
851+
'(_toolset=="host" and host_arch=="x64" and (host_os=="linux" or host_os=="mac"))', {
851852
'sources': [
852853
'<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc',
853854
'<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
@@ -861,7 +862,8 @@
861862
],
862863
}],
863864
# TODO(targos): Replace False with OS=="win" if handler-outside-simulator.cc becomes compatible with MSVC.
864-
['_toolset=="host" and host_arch=="x64" and (OS=="linux" or OS=="mac" or False)', {
865+
['_toolset=="host" and host_arch=="x64" and '
866+
'(host_os=="linux" or host_os=="mac" or False)', {
865867
'sources': [
866868
'<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc',
867869
],
@@ -1145,13 +1147,19 @@
11451147
'<(V8_ROOT)/src/base/platform/platform-fuchsia.cc',
11461148
]
11471149
}],
1148-
['OS == "mac" or OS == "ios"', {
1150+
['OS == "mac" or (_toolset=="host" and host_os=="mac")', {
11491151
'sources': [
11501152
'<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
11511153
'<(V8_ROOT)/src/base/platform/platform-darwin.cc',
11521154
'<(V8_ROOT)/src/base/platform/platform-macos.cc',
11531155
]
11541156
}],
1157+
['OS == "ios"', {
1158+
'sources': [
1159+
'<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
1160+
'<(V8_ROOT)/src/base/platform/platform-darwin.cc',
1161+
]
1162+
}],
11551163
['is_win', {
11561164
'sources': [
11571165
'<(V8_ROOT)/src/base/debug/stack_trace_win.cc',

0 commit comments

Comments
 (0)