-
Notifications
You must be signed in to change notification settings - Fork 24.6k
Commit ffa3d7f
Build macOS framework and add CocoaPods podspec (#285)
Summary:
Supersedes facebook/hermes#239
Currently used in our macOS fork of React Native microsoft#473. (Although we’re using a build of Hermes v0.4.1, as we’re at RN 0.62.0.)
* On Apple platforms build a [dynamic] framework bundle when `HERMES_BUILD_APPLE_FRAMEWORK` is set. When set to `FALSE` it will produce a `dylib`, like previously. Defaults to `TRUE`.
* On Apple platforms create a debugging symbols bundle.
* Add `HERMES_ENABLE_FUZZING`, which is enabled by default.
* Add `HERMES_ENABLE_TEST_SUITE`, which is enabled by default.
* Add a CocoaPods podspec that can build from source or use a binary.
A standalone macOS app that pulls in Hermes as a CocoaPods pod can be found here https://github.com/alloy/TestHermesMaster.
## Framework variant (default)
```
$ ./src/utils/build/configure.py --distribute --cmake-flags='-DCMAKE_INSTALL_PREFIX:PATH=../destroot_release' build
$ cd build && ninja install && cd ..
$ tree destroot_release/
destroot_release/
├── Library
│ └── Frameworks
│ ├── hermes.framework
│ │ ├── Headers -> Versions/Current/Headers
│ │ ├── Resources -> Versions/Current/Resources
│ │ ├── Versions
│ │ │ ├── 0
│ │ │ │ ├── Headers
│ │ │ │ │ ├── CompileJS.h
│ │ │ │ │ ├── DebuggerAPI.h
│ │ │ │ │ ├── Public
│ │ │ │ │ │ ├── Buffer.h
│ │ │ │ │ │ ├── CrashManager.h
│ │ │ │ │ │ ├── CtorConfig.h
│ │ │ │ │ │ ├── DebuggerTypes.h
│ │ │ │ │ │ ├── GCConfig.h
│ │ │ │ │ │ ├── GCTripwireContext.h
│ │ │ │ │ │ └── RuntimeConfig.h
│ │ │ │ │ ├── SynthTrace.h
│ │ │ │ │ ├── SynthTraceParser.h
│ │ │ │ │ ├── TraceInterpreter.h
│ │ │ │ │ ├── TracingRuntime.h
│ │ │ │ │ ├── hermes.h
│ │ │ │ │ └── hermes_tracing.h
│ │ │ │ ├── Resources
│ │ │ │ │ └── Info.plist
│ │ │ │ └── hermes
│ │ │ └── Current -> 0
│ │ └── hermes -> Versions/Current/hermes
│ └── hermes.framework.dSYM
│ └── Contents
│ ├── Info.plist
│ └── Resources
│ └── DWARF
│ └── hermes
├── bin
│ ├── hbcdump
│ ├── hdb
│ ├── hermes
│ ├── hermesc
│ └── hvm
└── include
├── hermes
│ ├── CompileJS.h
│ ├── DebuggerAPI.h
│ ├── Public
│ │ ├── Buffer.h
│ │ ├── CrashManager.h
│ │ ├── CtorConfig.h
│ │ ├── DebuggerTypes.h
│ │ ├── GCConfig.h
│ │ ├── GCTripwireContext.h
│ │ └── RuntimeConfig.h
│ ├── SynthTrace.h
│ ├── SynthTraceParser.h
│ ├── TraceInterpreter.h
│ ├── TracingRuntime.h
│ ├── hermes.h
│ └── hermes_tracing.h
└── jsi
├── JSIDynamic.h
├── decorator.h
├── instrumentation.h
├── jsi-inl.h
├── jsi.h
├── jsilib.h
└── threadsafe.h
```
# dylib variant
```
$ ./src/utils/build/configure.py --distribute --cmake-flags='-DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=false -DCMAKE_INSTALL_PREFIX:PATH=../destroot_release' build
$ cd build && ninja install && cd ..
$ tree destroot_release/
destroot_release/
├── bin
│ ├── hbcdump
│ ├── hdb
│ ├── hermes
│ ├── hermesc
│ └── hvm
├── include
│ ├── hermes
│ │ ├── CompileJS.h
│ │ ├── DebuggerAPI.h
│ │ ├── Public
│ │ │ ├── Buffer.h
│ │ │ ├── CrashManager.h
│ │ │ ├── CtorConfig.h
│ │ │ ├── DebuggerTypes.h
│ │ │ ├── GCConfig.h
│ │ │ ├── GCTripwireContext.h
│ │ │ └── RuntimeConfig.h
│ │ ├── SynthTrace.h
│ │ ├── SynthTraceParser.h
│ │ ├── TraceInterpreter.h
│ │ ├── TracingRuntime.h
│ │ ├── hermes.h
│ │ └── hermes_tracing.h
│ └── jsi
│ ├── JSIDynamic.h
│ ├── decorator.h
│ ├── instrumentation.h
│ ├── jsi-inl.h
│ ├── jsi.h
│ ├── jsilib.h
│ └── threadsafe.h
└── lib
├── libhermes.dylib
└── libhermes.dylib.dSYM
└── Contents
├── Info.plist
└── Resources
└── DWARF
└── libhermes.dylib
```
Pull Request resolved: facebook/hermes#285
Reviewed By: willholen
Differential Revision: D22398354
Pulled By: mhorowitz
fbshipit-source-id: 732524275cf273866171fc6e2ac2acb062185fbd1 parent a5151c2 commit ffa3d7fCopy full SHA for ffa3d7f
1 file changed
+4
-0
lines changedReactCommon/jsi/jsi/CMakeLists.txt
Copy file name to clipboardexpand all lines: ReactCommon/jsi/jsi/CMakeLists.txt+4
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + |
0 commit comments