Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
build libnode for ios app embedding
  • Loading branch information
chexiongsheng committed Aug 10, 2022
commit 5d19c5eb764784da3215ef5fbdd4002b90e5009d
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
parser = argparse.ArgumentParser()

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

if options.use_ninja:
gyp_args += ['-f', 'ninja']
gyp_args += ['-f', 'ninja-' + flavor]
elif flavor == 'win' and sys.platform != 'msys':
gyp_args += ['-f', 'msvs', '-G', 'msvs_version=auto']
else:
Expand Down
2 changes: 1 addition & 1 deletion deps/cares/cares.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
'include_dirs': [ 'config/linux' ],
'sources': [ 'config/linux/ares_config.h' ]
}],
[ 'OS=="mac"', {
[ 'OS=="mac" or OS=="ios"', {
'include_dirs': [ 'config/darwin' ],
'sources': [ 'config/darwin/ares_config.h' ]
}],
Expand Down
2 changes: 1 addition & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
},
},
'conditions': [
['OS != "aix" and OS != "mac"', {
['OS != "aix" and OS != "mac" and OS != "ios"', {
'ldflags': [
'-Wl,--whole-archive',
'<(obj_dir)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
Expand Down
4 changes: 2 additions & 2 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
},
},
'conditions': [
['OS!="aix" and node_shared=="false"', {
['OS!="aix" and OS!="ios" and node_shared=="false"', {
'ldflags': [
'-Wl,--whole-archive',
'<(obj_dir)/deps/zlib/<(STATIC_LIB_PREFIX)zlib<(STATIC_LIB_SUFFIX)',
Expand Down Expand Up @@ -184,7 +184,7 @@
},
},
'conditions': [
['OS!="aix" and node_shared=="false"', {
['OS!="aix" and OS!="ios" and node_shared=="false"', {
'ldflags': [
'-Wl,--whole-archive',
'<(obj_dir)/deps/uv/<(STATIC_LIB_PREFIX)uv<(STATIC_LIB_SUFFIX)',
Expand Down
1 change: 1 addition & 0 deletions tools/gyp/pylib/gyp/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ def CopyTool(flavor, out_path, generator_flags={}):
"os400": "flock",
"solaris": "flock",
"mac": "mac",
"ios": "mac",
Comment thread
chexiongsheng marked this conversation as resolved.
Outdated
"win": "win",
}.get(flavor, None)
if not prefix:
Expand Down
4 changes: 2 additions & 2 deletions tools/gyp/pylib/gyp/generator/ninja.py
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ def WriteTarget(self, spec, config_name, config, link_deps, compile_deps):
elif spec["type"] == "static_library":
self.target.binary = self.ComputeOutput(spec)
if (
self.flavor not in ("mac", "openbsd", "netbsd", "win")
self.flavor not in ("mac", "openbsd", "netbsd", "win", "ios")
and not self.is_standalone_static_library
):
self.ninja.build(
Expand Down Expand Up @@ -2496,7 +2496,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name
),
)

if flavor != "mac" and flavor != "win":
if flavor != "mac" and flavor != "win" and flavor != "ios":
master_ninja.rule(
"alink",
description="AR $out",
Expand Down
12 changes: 9 additions & 3 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@
'conditions': [
['v8_enable_webassembly==1', {
'conditions': [
['OS=="mac" or (_toolset=="host" and host_arch=="x64" and OS=="linux")', {
['OS=="mac" or OS=="ios" or (_toolset=="host" and host_arch=="x64" and (host_os=="linux" or host_os=="mac"))', {
Comment thread
chexiongsheng marked this conversation as resolved.
Outdated
'sources': [
'<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc',
'<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc',
Expand All @@ -861,7 +861,7 @@
],
}],
# TODO(targos): Replace False with OS=="win" if handler-outside-simulator.cc becomes compatible with MSVC.
['_toolset=="host" and host_arch=="x64" and (OS=="linux" or OS=="mac" or False)', {
['_toolset=="host" and host_arch=="x64" and (host_os=="linux" or host_os=="mac" or False)', {
'sources': [
'<(V8_ROOT)/src/trap-handler/handler-outside-simulator.cc',
],
Expand Down Expand Up @@ -1145,13 +1145,19 @@
'<(V8_ROOT)/src/base/platform/platform-fuchsia.cc',
]
}],
['OS == "mac" or OS == "ios"', {
['OS == "mac" or (_toolset=="host" and host_os=="mac")', {
'sources': [
'<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
'<(V8_ROOT)/src/base/platform/platform-darwin.cc',
'<(V8_ROOT)/src/base/platform/platform-macos.cc',
]
}],
['OS == "ios"', {
'sources': [
'<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
'<(V8_ROOT)/src/base/platform/platform-darwin.cc',
]
}],
['is_win', {
'sources': [
'<(V8_ROOT)/src/base/debug/stack_trace_win.cc',
Expand Down