Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ source_set("hermes_inspector") {
source_set("napi_hermes_source_set") {
cflags_cc = ["-std=c++14", "-fvisibility=hidden", "-Wno-unused-parameter", "-Wno-extra-semi", "-Wno-gnu-zero-variadic-macro-arguments", "-Wno-gnu-anonymous-struct", "-Wno-c99-extensions", "-Wno-nested-anon-types"]
if(build_ios){
cflags_cc += ["-Wno-deprecated-copy"]
cflags_cc += ["-Wno-deprecated-copy", "-Wno-unused-but-set-variable"]
}
configs = [":llvm_build", ":hermes_build", ":strict_build", ":napi_build", ":react_native_common_build", ":jsi_hermes_build", ":rtti_build"]
sources = [
Expand Down
5 changes: 4 additions & 1 deletion BUILDCONFIG.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ declare_args() {
asan = false
ubsan = false

# iOS 交叉编译,否则编译 macOS 版本
# iOS 交叉编译,否则编译 macOS 版本(不会产生静态库)
build_ios = false
# 和 -apple-ios9.0 拼接,作为 -target 参数

# build_mac 和 build_ios 配合,编译 mac 版本静态库
build_mac = false

# QuickJS 专属
big_number = false
}
Expand Down
2 changes: 1 addition & 1 deletion toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ toolchain("clang") {
if (code_coverage) {
compiler_command = string_join(" ", ["-fprofile-instr-generate -fcoverage-mapping", compiler_command])
}
if (build_ios) {
if (build_ios && !build_mac) {
target_option = "-target $cross_compile_target-apple-ios9.0"
if (cross_compile_target == "i386" || cross_compile_target == "x86_64") {
target_option = string_join("-", [target_option, "simulator"])
Expand Down