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 macOS arm64 support to 0.5.x #390

Merged
merged 4 commits into from
Oct 28, 2020
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
9 changes: 5 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:

macos:
macos:
xcode: "10.0.0"
xcode: "12.0.0-beta"
environment:
- HERMES_WS_DIR: /tmp/hermes
- TERM: dumb
Expand All @@ -204,7 +204,7 @@ jobs:
name: Build Hermes for macOS
command: |
cd "$HERMES_WS_DIR"
hermes/utils/build/configure.py --distribute --cmake-flags='-DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=false'
hermes/utils/build/configure.py --distribute --cmake-flags='-DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=false -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.13 -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64;arm64'
cmake --build ./build_release --target github-cli-release
- run:
name: Copy artifacts
Expand All @@ -228,7 +228,7 @@ jobs:

build-macos-runtime:
macos:
xcode: "10.3.0"
xcode: "12.0.0-beta"
environment:
- HERMES_WS_DIR: /tmp/hermes
- TERM: dumb
Expand All @@ -251,6 +251,7 @@ jobs:
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"
cmake --build ./build_release
cmake --build ./build_release --target hermes-runtime-darwin-cocoapods-release
- run:
name: Copy artifacts
Expand Down Expand Up @@ -302,7 +303,7 @@ jobs:

test-macos-runtime-build-and-cocoapods-integration:
macos:
xcode: "10.3.0"
xcode: "12.0.0-beta"
environment:
- TERM: dumb
# Homebrew currently breaks while updating:
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ endif()
# - npm/package.json
# - hermes.podspec
project(Hermes
VERSION 0.5.2
VERSION 0.5.3
LANGUAGES C CXX)
# Optional suffix like "-rc3"
set(VERSION_SUFFIX "-rc1")
set(VERSION_SUFFIX "")

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// This must be consistent with the release_version in npm/package.json
// and the HERMES_RELEASE_VERSION in CMakeLists.txt
def release_version = "0.5.2-rc1"
def release_version = "0.5.3"

buildscript {
ext {
Expand Down
8 changes: 5 additions & 3 deletions hermes.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ module HermesHelper
# BUILD_TYPE = :debug
BUILD_TYPE = :release

DEPLOYMENT_TARGET = "10.13"

def self.command_exists?(bin)
"command -v #{bin} > /dev/null 2>&1"
end

def self.cmake_configuration
"-DHERMES_ENABLE_DEBUGGER:BOOLEAN=true -DHERMES_ENABLE_FUZZING:BOOLEAN=false -DHERMES_ENABLE_TEST_SUITE:BOOLEAN=false -DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=true -DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true"
"-DHERMES_ENABLE_DEBUGGER:BOOLEAN=true -DHERMES_ENABLE_FUZZING:BOOLEAN=false -DHERMES_ENABLE_TEST_SUITE:BOOLEAN=false -DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=true -DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=#{DEPLOYMENT_TARGET} -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64;arm64"
end

def self.configure_command
Expand All @@ -22,14 +24,14 @@ end

Pod::Spec.new do |spec|
spec.name = "hermes"
spec.version = "0.5.1"
spec.version = "0.5.3"
spec.summary = "Hermes is a small and lightweight JavaScript engine optimized for running React Native."
spec.description = "Hermes is a JavaScript engine optimized for fast start-up of React Native apps. It features ahead-of-time static optimization and compact bytecode."
spec.homepage = "https://hermesengine.dev"
spec.license = { type: "MIT", file: "LICENSE" }
spec.author = "Facebook"
spec.source = { git: "https://github.com/facebook/hermes.git", tag: "v#{spec.version}" }
spec.platforms = { :osx => "10.14" }
spec.platforms = { :osx => HermesHelper::DEPLOYMENT_TARGET }

spec.preserve_paths = ["destroot/bin/*"].concat(HermesHelper::BUILD_TYPE == :debug ? ["**/*.{h,c,cpp}"] : [])
spec.source_files = "destroot/include/**/*.h"
Expand Down
2 changes: 1 addition & 1 deletion npm/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.5.2-rc1",
"version": "0.5.3",
"scripts": {
"unpack-builds": "node unpack-builds.js",
"unpack-builds-dev": "node unpack-builds.js --dev",
Expand Down