Skip to content

Commit 045f81f

Browse files
chexiongshengjuanarbol
authored andcommitted
gyp: libnode for ios app embedding
PR-URL: #44210 Reviewed-By: Jiawen Geng <[email protected]>
1 parent ea323e0 commit 045f81f

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')
@@ -2081,7 +2081,7 @@ def make_bin_override():
20812081
gyp_args = ['--no-parallel', '-Dconfiguring_node=1']
20822082

20832083
if options.use_ninja:
2084-
gyp_args += ['-f', 'ninja']
2084+
gyp_args += ['-f', 'ninja-' + flavor]
20852085
elif flavor == 'win' and sys.platform != 'msys':
20862086
gyp_args += ['-f', 'msvs', '-G', 'msvs_version=auto']
20872087
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
@@ -229,7 +229,7 @@
229229
},
230230
},
231231
'conditions': [
232-
['OS != "aix" and OS != "mac"', {
232+
['OS != "aix" and OS != "mac" and OS != "ios"', {
233233
'ldflags': [
234234
'-Wl,--whole-archive',
235235
'<(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
@@ -822,7 +822,8 @@
822822
'conditions': [
823823
['v8_enable_webassembly==1', {
824824
'conditions': [
825-
['OS=="mac" or (_toolset=="host" and host_arch=="x64" and OS=="linux")', {
825+
['OS=="mac" or OS=="ios" or '
826+
'(_toolset=="host" and host_arch=="x64" and (host_os=="linux" or host_os=="mac"))', {
826827
'sources': [
827828
'<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc',
828829
'<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
@@ -836,7 +837,8 @@
836837
],
837838
}],
838839
# TODO(targos): Replace False with OS=="win" if handler-outside-simulator.cc becomes compatible with MSVC.
839-
['_toolset=="host" and host_arch=="x64" and (OS=="linux" or OS=="mac" or False)', {
840+
['_toolset=="host" and host_arch=="x64" and '
841+
'(host_os=="linux" or host_os=="mac" or False)', {
840842
'sources': [
841843
'<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc',
842844
],
@@ -1115,12 +1117,18 @@
11151117
'<(V8_ROOT)/src/base/platform/platform-fuchsia.cc',
11161118
]
11171119
}],
1118-
['OS == "mac" or OS == "ios"', {
1120+
['OS == "mac" or (_toolset=="host" and host_os=="mac")', {
11191121
'sources': [
11201122
'<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
11211123
'<(V8_ROOT)/src/base/platform/platform-macos.cc',
11221124
]
11231125
}],
1126+
['OS == "ios"', {
1127+
'sources': [
1128+
'<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
1129+
'<(V8_ROOT)/src/base/platform/platform-darwin.cc',
1130+
]
1131+
}],
11241132
['is_win', {
11251133
'sources': [
11261134
'<(V8_ROOT)/src/base/debug/stack_trace_win.cc',

0 commit comments

Comments
 (0)