-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathPrimJS.podspec
More file actions
148 lines (131 loc) · 5.72 KB
/
PrimJS.podspec
File metadata and controls
148 lines (131 loc) · 5.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Copyright 2024 The Lynx Authors. All rights reserved.
# Licensed under the Apache License Version 2.0 that can be found in the
# LICENSE file in the root directory of this source tree.
#
# Be sure to run `pod lib lint XElement.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = "PrimJS"
s.version = begin
raw_version = ENV['POD_VERSION'] || File.read('PRIMJS_VERSION').strip
raw_version
end
s.summary = "A short description of PrimJS."
s.homepage = "https://github.com/lynx-family/primjs"
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
TODO: Add long description of the pod here.
DESC
s.license = "MIT"
s.author = { "pandazyp" => "2823543594@qq.com" }
s.source = { :git => "https://github.com/lynx-family/primjs.git", }.tap do |source_hash|
source_hash[:commit] = ENV['PRIMJS_COMMIT_ID']
end
s.compiler_flags = "-Wall", "-Wno-shorten-64-to-32", "-Os"
s.ios.deployment_target = "9.0"
s.pod_target_xcconfig = {
"GCC_PREPROCESSOR_DEFINITIONS" => "OS_IOS=1 JSC_OBJC_API_ENABLED=1 ENABLE_CODECACHE ENABLE_VIRTUAL_STACK=1",
"CLANG_CXX_LANGUAGE_STANDARD" => "gnu++17",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/src\" \
\"${PODS_TARGET_SRCROOT}/src/interpreter\"",
}
s.default_subspecs = "quickjs"
$enable_compatible_mm = 1
$enable_primjs_snapshot = 1
s.subspec "quickjs" do |sp|
if $enable_primjs_snapshot == 1
sp.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "ENABLE_PRIMJS_SNAPSHOT ENABLE_COMPATIBLE_MM ENABLE_LEPUSNG LYNX_SIMPLIFY=0" }
else
sp.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "ENABLE_LEPUSNG LYNX_SIMPLIFY=0" }
end
sp.header_dir = "quickjs/include"
sp.public_header_files = ["src/interpreter/quickjs/include/*.h",
"src/gc/*.h"]
sp.source_files = ["src/gc/*.{h,cc}",
"src/interpreter/quickjs/**/*.{h,cc}",
"src/interpreter/primjs/ios/embedded.S",
"src/inspector/interface.h"]
sp.dependency "PrimJS/log"
end
s.subspec "quickjs_debugger" do |sp|
if $enable_primjs_snapshot == 1
sp.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "ENABLE_PRIMJS_SNAPSHOT ENABLE_COMPATIBLE_MM ENABLE_LEPUSNG LYNX_SIMPLIFY=0 ENABLE_QUICKJS_DEBUGGER" }
else
sp.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "ENABLE_LEPUSNG LYNX_SIMPLIFY=0 ENABLE_QUICKJS_DEBUGGER" }
end
sp.public_header_files = "src/inspector/*.h"
sp.header_dir = "devtool/quickjs"
sp.source_files = ["src/inspector/**/*.{h,cc}",
"src/interpreter/primjs/ios/embedded-inspector.S"]
sp.exclude_files = ["src/inspector/interface.h"]
sp.dependency "PrimJS/quickjs"
end
s.subspec "quickjs_heapprofiler" do |sp|
sp.dependency "PrimJS/quickjs_debugger"
end
s.subspec "quickjs_profiler" do |sp|
sp.dependency "PrimJS/quickjs_debugger"
end
s.subspec "napi" do |sp|
# if codecache is wanted, uncomment the next line.
# sp.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "ENABLE_CODECACHE PROFILE_CODECACHE" }
sp.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"${PODS_ROOT}/PrimJS\"" }
sp.subspec "core" do |ssp|
ssp.source_files = ["src/napi/*.{h,cc}", "src/napi/common/*.{h,cc}"]
ssp.public_header_files = ["src/napi/*.h", "src/napi/common/*.h"]
end
sp.subspec "env" do |ssp|
ssp.source_files = "src/napi/env/*.{h,cc}"
ssp.public_header_files = "src/napi/env/*.h"
ssp.dependency "PrimJS/napi/core"
end
sp.subspec "quickjs" do |ssp|
ssp.source_files = "src/napi/quickjs/*.{h,cc}"
ssp.public_header_files = "src/napi/quickjs/napi_env_quickjs.h"
ssp.dependency "PrimJS/napi/core"
ssp.dependency "PrimJS/quickjs"
end
sp.subspec "jsc" do |ssp|
# To test wasm with JavaScriptCore on Playground, uncomment the next line.
# ssp.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "JSC_OBJC_API_ENABLED=0 NAPI_ENABLE_WASM=1" }
ssp.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "JSC_OBJC_API_ENABLED=0" }
ssp.source_files = "src/napi/jsc/*.{h,cc}"
ssp.public_header_files = "src/napi/jsc/napi_env_jsc.h"
ssp.dependency "PrimJS/napi/core"
ssp.dependency "PrimJS/log"
ssp.dependency "PrimJS/quickjs"
ssp.frameworks = "JavaScriptCore"
end
sp.subspec "adapter" do |ssp|
ssp.source_files = [
"src/napi/adapter/js_native_api_adapter.{h,cc}",
"src/napi/adapter/weak_napi_host_generator.cc",
"src/napi/adapter/primjs_weak_node_api_provider.h",
"src/napi/adapter/weak_node_api_host.h",
]
ssp.public_header_files = [
"src/napi/adapter/js_native_api_adapter.h",
"src/napi/adapter/primjs_weak_node_api_provider.h",
]
ssp.private_header_files = [
"src/napi/adapter/weak_node_api_host.h",
]
ssp.dependency "PrimJS/napi/core"
ssp.dependency "PrimJS/napi/env"
end
end
s.subspec "log" do |sp|
sp.header_mappings_dir = "src"
sp.source_files = ["src/basic/log/logging.*",
"src/basic/log/primjs_logging.cc",
"src/interpreter/quickjs/include/base_export.h"]
end
end