Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add job to build macOS CocoaPods binaries #290

Closed
wants to merge 3 commits into from

Conversation

alloy
Copy link
Contributor

@alloy alloy commented Jul 10, 2020

Summary

Adds a CI job to build binaries for macOS to be used via CocoaPods.

Test Plan

$ mkdir test-hermes-build
$ cd test-hermes-build/
$ curl -L -O https://6909-154201259-gh.circle-artifacts.com/0/tmp/hermes/output/hermes-runtime-darwin-v0.5.0.tar.gz
$ tar -zxvf hermes-runtime-darwin-v0.5.0.tar.gz
$ tree .
.
├── LICENSE
├── README.md
├── destroot
│   ├── Library
│   │   └── Frameworks
│   │       ├── hermes.framework
│   │       │   ├── 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
│   │       │   ├── 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
│   │       │   │       ├── 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
│   │       │   └── 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
├── hermes-runtime-darwin-v0.5.0.tar.gz
└── hermes.podspec

25 directories, 84 files

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jul 10, 2020
@alloy alloy force-pushed the build-macOS-podspec-binary branch from 36c2a0c to 33a3f10 Compare July 10, 2020 19:21
@alloy alloy force-pushed the build-macOS-podspec-binary branch from 33a3f10 to 2bc27a5 Compare July 10, 2020 19:36
@alloy alloy changed the title [WIP] Add job to build macOS CocoaPods binaries Add job to build macOS CocoaPods binaries Jul 10, 2020
@alloy
Copy link
Contributor Author

alloy commented Jul 10, 2020

@willholen So this is the correct package layout for CocoaPods to ingest directly (without a root directory), but I just realised that that may not be the best way to package it for the npm step. I’ll take a look at the contents of the other job artifacts to see what it should be when I continue on this.

UPDATE: Just checked the android artefacts and those are also packed without a root dir, so this should be consistent then 👍

@alloy alloy changed the title Add job to build macOS CocoaPods binaries [WIP] Add job to build macOS CocoaPods binaries Jul 10, 2020
@mhorowitz
Copy link
Contributor

mhorowitz commented Jul 10, 2020

Just to make sure I understand, with this change, in circleci, macos-cocoapods is analogous to android, in that those jobs build the necessary runtime artifacts for an application using Hermes, right?

If so, I wonder if it would be clearer to rename android to android-runtime, and macos-cocoapods to macos-runtime. Even just the second rename (calling it what it makes, instead of how it makes it) would help.

In the future, I think we should consider making the names of the cli and runtime artifacts and the circleci jobs which build them more consistent, but that need not delay this PR. For now, I think the single rename above would clarify my immediate confusion.

@alloy
Copy link
Contributor Author

alloy commented Jul 11, 2020

@mhorowitz Correct. I’ll update those job names 👍

@alloy
Copy link
Contributor Author

alloy commented Jul 13, 2020

@mhorowitz I went a little further in renaming jobs, hope that’s ok.

@alloy alloy changed the title [WIP] Add job to build macOS CocoaPods binaries Add job to build macOS CocoaPods binaries Jul 13, 2020
@alloy
Copy link
Contributor Author

alloy commented Jul 13, 2020

I’ll move on to the NPM package creation part, which I can either add to this PR or you can merge it as a self-contained change. Whichever comes first and is most convenient to you.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@willholen has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@mhorowitz
Copy link
Contributor

@alloy It looks like you didn't rename test-macos-cocoapods, and it's not obvious to the casual observer what this is testing (cli or runtime. or both?)

One of the things which remains a bit confusing (although perhaps improved) is the correspondence between the circleci job names and the github release tarballs they generate. The hermes-cli-* and hermes-runtime-* tarballs at https://github.com/facebook/hermes/releases correspond one to one with circleci tasks which generate them. Your current names make it a bit more clear what's happening if you know this, but I think it would be nice if the circleci names and release files had more directly corresponding names. With the PR as of now, hermes-cli-linux-... is built by the build-cli-tools-for-linux job, which is not unclear, but also unnecessarily different. hermes-cli-darwin-... is built by build-cli-tools-for-macos, which adds a darwin vs macos difference. The tarball names are based on CMAKE_SYSTEM_NAME, so keeping those suffixes will simplify the build files, but switching the literal parts would be ok with me. I don't have strong preferences on the specifics, but consistency is valuable.

@alloy
Copy link
Contributor Author

alloy commented Jul 13, 2020

Agreed on consistency, just wasn’t sure how far I was supposed to go. I can do that, let me know if you want it in this PR or a follow-up one.

@mhorowitz
Copy link
Contributor

In this PR, I'm fine if all we do is use initial names for macos-cocoapods and test-macos-cocoapods which are more clear what they build/test, even if consistency is still lacking. Improving consistency can be in this PR, or later, but in the interest of keeping PRs small and isolated, a follow-up may be better. I don't see value in renaming existing jobs to something differently inconsistent in this PR.

@alloy alloy force-pushed the build-macOS-podspec-binary branch from 6241f5a to cffb719 Compare July 14, 2020 18:06
@facebook-github-bot
Copy link
Contributor

@alloy has updated the pull request. Re-import the pull request

@alloy
Copy link
Contributor Author

alloy commented Jul 14, 2020

In this PR, I'm fine if all we do is use initial names for macos-cocoapods and test-macos-cocoapods which are more clear what they build/test

@mhorowitz My bad, I reverted that change and redid it for just those two jobs 👍

name: Build Hermes for macOS as CocoaPods pod
command: |
cd "$HERMES_WS_DIR"
hermes/utils/build/configure.py --distribute --cmake-flags="$(ruby -rcocoapods-core -e 'load %{hermes/hermes.podspec}; puts HermesHelper.cmake_configuration') -DCMAKE_INSTALL_PREFIX:PATH=../destroot"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought, maybe for a followup PR:

Is this --cmake-flags trick something every cocoapods developer is going to need to do? I wonder if it would be helpful to add a --cocoapods flag to configure.py to encapsulate this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No; the podspec includes this and is able to build the binaries in case somebody decides to install hermes from source. No interaction of the user is needed.

mkdir -p "$HERMES_WS_DIR" "$HERMES_WS_DIR/output" "$HERMES_WS_DIR/package-root"
ln -sf "$PWD" "$HERMES_WS_DIR/hermes"
- run:
name: Build Hermes for macOS as CocoaPods pod
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the process for building a pod doesn't involve running the pod tool?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A pod is either source or binaries with a podspec that knows how to include those. Typically the podspecs are served from a centralized spec repo, in which case you might use the pod tool to push the spec on release. In the case of RN, though, they are shipped within npm packages, so the only work that needs to be done is to build the binaries and package them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the podspec seems to have code for building the Framework (although just by calling cmake), is there a reason to write out the similar logic here? It just seems like a violation of DRY.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no pod cli feature to invoke an arbitrary podspec’s prepare_command. I did try to counter the DRY violation by refactoring the podspec such that we could load it here and get the configuration that matters (I don’t consider the build and destroot locations to be part of that), so those only need to be maintained in a single place.

Copy link
Contributor

@mhorowitz mhorowitz Jul 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bummer. I guess we could move the logic in prepare_command into a shell script which is run by cocoapods or circleci. but that can be a followup, too. I've asked enough questions already. Thanks for educating me.

def self.configure_command
"./utils/build/configure.py #{BUILD_TYPE == :release ? "--distribute" : "--build-type=Debug"} --cmake-flags='-DHERMES_ENABLE_DEBUGGER:BOOLEAN=true -DHERMES_ENABLE_FUZZING:BOOLEAN=false -DHERMES_ENABLE_TEST_SUITE:BOOLEAN=false -DCMAKE_INSTALL_PREFIX:PATH=../destroot' build"
"./utils/build/configure.py #{BUILD_TYPE == :release ? "--distribute" : "--build-type=Debug"} --cmake-flags='#{HermesHelper.cmake_configuration} -DCMAKE_INSTALL_PREFIX:PATH=../destroot' build"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I barely remember what little I ever knew about cocoapods, how do all the pieces here come together?

If I understand correctly, the plan is that we will provide an npm which includes the prebuilt hermes pod, and this will be consumed by mac apps which use hermes. Is this right?

I see where circleci builds the pod above, but I also see code below (lines 44,46) where the same build commands appear in the podspec. When are these commands used?

For an application which consumes hermes, how does cocoapods know where to find the prebuilt hermes framework?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, this is here so users can install from source, if need be. The releases we cut just come with the artefacts in the same place as where this podspec expects them to be (e.g. vendored_framework)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And correct, the plan is to ship them in npm bundles, as most other RN deps are distributed. (I am personally not convinced we should keep doing it in such a roundabout way, but for now it works.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I think I see. The app Podspec would point to node_modules/hermes-engine-darwin (maybe with some ..s), then? I think that was the bit I hadn't figured out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that’s it 👍 See the integration test for an example of what that syntax would look like (although in that test the binaries don’t exist yet and so it will build them through cmake)

pod 'hermes', :path => '../../'

Copy link
Contributor Author

@alloy alloy Jul 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For posterity, there’s no real need to distribute this as a npm package, but we’re doing this simply for consistency with the other RN deps (as discussed with @willholen).

@mhorowitz
Copy link
Contributor

At this point, I'm satisifed. @willholen can you import one more time?

image

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@willholen has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@willholen merged this pull request in 63f4720.

@alloy alloy deleted the build-macOS-podspec-binary branch July 16, 2020 13:22
alloy added a commit to alloy/hermes that referenced this pull request Jul 16, 2020
willholen pushed a commit that referenced this pull request Jul 29, 2020
Summary:
Adds a CI job to build binaries for macOS to be used via CocoaPods.

Pull Request resolved: #290

Test Plan:
```
$ mkdir test-hermes-build
$ cd test-hermes-build/
$ curl -L -O https://6909-154201259-gh.circle-artifacts.com/0/tmp/hermes/output/hermes-runtime-darwin-v0.5.0.tar.gz
$ tar -zxvf hermes-runtime-darwin-v0.5.0.tar.gz
$ tree .
.
├── LICENSE
├── README.md
├── destroot
│   ├── Library
│   │   └── Frameworks
│   │       ├── hermes.framework
│   │       │   ├── 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
│   │       │   ├── 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
│   │       │   │       ├── 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
│   │       │   └── 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
├── hermes-runtime-darwin-v0.5.0.tar.gz
└── hermes.podspec

25 directories, 84 files
```

Reviewed By: mhorowitz

Differential Revision: D22510579

Pulled By: willholen

fbshipit-source-id: 31a234b908090cdcbf7d1eafe78269ed19583883
willholen pushed a commit that referenced this pull request Jul 29, 2020
Summary:
Adds a CI job to build binaries for macOS to be used via CocoaPods.

Pull Request resolved: #290

Test Plan:
```
$ mkdir test-hermes-build
$ cd test-hermes-build/
$ curl -L -O https://6909-154201259-gh.circle-artifacts.com/0/tmp/hermes/output/hermes-runtime-darwin-v0.5.0.tar.gz
$ tar -zxvf hermes-runtime-darwin-v0.5.0.tar.gz
$ tree .
.
├── LICENSE
├── README.md
├── destroot
│   ├── Library
│   │   └── Frameworks
│   │       ├── hermes.framework
│   │       │   ├── 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
│   │       │   ├── 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
│   │       │   │       ├── 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
│   │       │   └── 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
├── hermes-runtime-darwin-v0.5.0.tar.gz
└── hermes.podspec

25 directories, 84 files
```

Reviewed By: mhorowitz

Differential Revision: D22510579

Pulled By: willholen

fbshipit-source-id: 31a234b908090cdcbf7d1eafe78269ed19583883
willholen pushed a commit to willholen/hermes that referenced this pull request Jul 29, 2020
Summary:
Adds a CI job to build binaries for macOS to be used via CocoaPods.

Pull Request resolved: facebook#290

Test Plan:
```
$ mkdir test-hermes-build
$ cd test-hermes-build/
$ curl -L -O https://6909-154201259-gh.circle-artifacts.com/0/tmp/hermes/output/hermes-runtime-darwin-v0.5.0.tar.gz
$ tar -zxvf hermes-runtime-darwin-v0.5.0.tar.gz
$ tree .
.
├── LICENSE
├── README.md
├── destroot
│   ├── Library
│   │   └── Frameworks
│   │       ├── hermes.framework
│   │       │   ├── 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
│   │       │   ├── 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
│   │       │   │       ├── 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
│   │       │   └── 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
├── hermes-runtime-darwin-v0.5.0.tar.gz
└── hermes.podspec

25 directories, 84 files
```

Reviewed By: mhorowitz

Differential Revision: D22510579

Pulled By: willholen

fbshipit-source-id: 31a234b908090cdcbf7d1eafe78269ed19583883
willholen pushed a commit to willholen/hermes that referenced this pull request Jul 30, 2020
Summary:
Adds a CI job to build binaries for macOS to be used via CocoaPods.

Pull Request resolved: facebook#290

Test Plan:
```
$ mkdir test-hermes-build
$ cd test-hermes-build/
$ curl -L -O https://6909-154201259-gh.circle-artifacts.com/0/tmp/hermes/output/hermes-runtime-darwin-v0.5.0.tar.gz
$ tar -zxvf hermes-runtime-darwin-v0.5.0.tar.gz
$ tree .
.
├── LICENSE
├── README.md
├── destroot
│   ├── Library
│   │   └── Frameworks
│   │       ├── hermes.framework
│   │       │   ├── 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
│   │       │   ├── 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
│   │       │   │       ├── 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
│   │       │   └── 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
├── hermes-runtime-darwin-v0.5.0.tar.gz
└── hermes.podspec

25 directories, 84 files
```

Reviewed By: mhorowitz

Differential Revision: D22510579

Pulled By: willholen

fbshipit-source-id: 31a234b908090cdcbf7d1eafe78269ed19583883
willholen pushed a commit to willholen/hermes that referenced this pull request Jul 30, 2020
Summary:
Adds a CI job to build binaries for macOS to be used via CocoaPods.

Pull Request resolved: facebook#290

Test Plan:
```
$ mkdir test-hermes-build
$ cd test-hermes-build/
$ curl -L -O https://6909-154201259-gh.circle-artifacts.com/0/tmp/hermes/output/hermes-runtime-darwin-v0.5.0.tar.gz
$ tar -zxvf hermes-runtime-darwin-v0.5.0.tar.gz
$ tree .
.
├── LICENSE
├── README.md
├── destroot
│   ├── Library
│   │   └── Frameworks
│   │       ├── hermes.framework
│   │       │   ├── 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
│   │       │   ├── 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
│   │       │   │       ├── 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
│   │       │   └── 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
├── hermes-runtime-darwin-v0.5.0.tar.gz
└── hermes.podspec

25 directories, 84 files
```

Reviewed By: mhorowitz

Differential Revision: D22510579

Pulled By: willholen

fbshipit-source-id: 31a234b908090cdcbf7d1eafe78269ed19583883
Huxpro pushed a commit that referenced this pull request Jul 30, 2020
* Build macOS framework and add CocoaPods podspec (#285)

Summary:
Supersedes #239

Currently used in our macOS fork of React Native microsoft/react-native-macos#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.

```
$ ./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
```

```
$ ./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: #285

Reviewed By: willholen

Differential Revision: D22398354

Pulled By: mhorowitz

fbshipit-source-id: 732524275cf273866171fc6e2ac2acb062185fbd

* Add job to build macOS CocoaPods binaries (#290)

Summary:
Adds a CI job to build binaries for macOS to be used via CocoaPods.

Pull Request resolved: #290

Test Plan:
```
$ mkdir test-hermes-build
$ cd test-hermes-build/
$ curl -L -O https://6909-154201259-gh.circle-artifacts.com/0/tmp/hermes/output/hermes-runtime-darwin-v0.5.0.tar.gz
$ tar -zxvf hermes-runtime-darwin-v0.5.0.tar.gz
$ tree .
.
├── LICENSE
├── README.md
├── destroot
│   ├── Library
│   │   └── Frameworks
│   │       ├── hermes.framework
│   │       │   ├── 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
│   │       │   ├── 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
│   │       │   │       ├── 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
│   │       │   └── 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
├── hermes-runtime-darwin-v0.5.0.tar.gz
└── hermes.podspec

25 directories, 84 files
```

Reviewed By: mhorowitz

Differential Revision: D22510579

Pulled By: willholen

fbshipit-source-id: 31a234b908090cdcbf7d1eafe78269ed19583883

* Add explicit option to build Apple dSYM (#296)

Summary:
Add `HERMES_BUILD_APPLE_DSYM` option to build a dSYM bundle for the libhermes target on Apple platforms.

This will work with any of the build types and is off by default.

Installing the tools with the install/strip target will ensure all tools and the runtime lib are stripped of debug symbols, but leaving the dSYM bundle in tact.

Pull Request resolved: #296

Test Plan:

```bash
./src/utils/build/configure.py --distribute --cmake-flags='-DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true -DCMAKE_INSTALL_PREFIX:PATH=../destroot_release' build_release
cmake --build ./build_release
```

```bash
cmake --build ./build_release --target install
nm -a destroot_release/bin/hermesc | wc -l
   27943
```

```bash
cmake --build ./build_release --target install/strip
nm -a destroot_release/bin/hermesc | wc -l
     250
```

…and dSYM DWARF metadata is maintained:

```bash
dwarfdump --statistics destroot_release/Library/Frameworks/hermes.framework.dSYM
{"version":3,"file":"destroot_release/Library/Frameworks/hermes.framework.dSYM/Contents/Resources/DWARF/hermes","format":"Mach-O 64-bit x86-64","source functions":30305,"source functions with location":30302,"inlined functions":172725,"inlined funcs with abstract origins":172725,"unique source variables":79276,"source variables":353690,"variables with location":232195,"call site entries":186409,"scope bytes total":19161949,"scope bytes covered":10500176,"total function size":1763513,"total inlined function size":998375,"total formal params":300264,"formal params with source location":166067,"formal params with type":300264,"formal params with binary location":200407,"total vars":38809,"vars with source location":38385,"vars with type":38809,"vars with binary location":22161}
```

Reviewed By: tmikov

Differential Revision: D22576263

Pulled By: willholen

fbshipit-source-id: 2bda49e638d145ba5d029e77069d6adcc0b1dd8c

* Create hermes-engine-darwin npm package (#297)

Summary:
{emoji:26a0} _This includes the changes of #296, so I’ll have to rebase this PR once that lands. The changes that pertain to this PR are in 9da61f7a9da01b5bd49e95dca0b98a5204210790_

Adds hermes-engine-darwin to the npm CI job.

Notably the symbolic links need to be stripped from the framework bundle, as npm by design does not support symbolic links to exist in packages. However, seeing as we already package distinct versions of the framework in distinct npm packages, there isn't any need to support multiple versions of Hermes in a single framework bundle; so this should be fine.

Pull Request resolved: #297

Test Plan: TODO: I’ll need to backport all changes to Hermes v0.4.1 in order to pull it into RN macOS v0.62. In the meantime I want to see if CI is correctly cutting this package.

Reviewed By: mhorowitz

Differential Revision: D22700399

Pulled By: willholen

fbshipit-source-id: f72aefa3fd98a85c8da3e9a38dfa6be9723a0270

* Kludge unit test resolution of Handle

* Remove special build directory suffixes in configure.py

Summary:
Right now, `configure.py` generates different directory suffixes
depending on the build mode. This can lead to some slightly
surprising behaviour when people build for ASAN/UBSAN and can also
make automated scripts that use `configure.py` clunkier. This change
removes those special suffixes when a build directory is specified.

Reviewed By: dulinriley

Differential Revision: D21268445

fbshipit-source-id: 90f5497f3930dee35dbea7e8f7ad64d6ac244fca

Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com>
Co-authored-by: Neil Dhar <neildhar@fb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants