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

emscripten: use upstream recommended llvm revision #63183

Closed
wants to merge 1 commit into from
Closed
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
24 changes: 12 additions & 12 deletions Formula/emscripten.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Emscripten < Formula
# Emscripten is available under 2 licenses, the MIT license and the
# University of Illinois/NCSA Open Source License.
license "MIT"
revision 1
head "https://github.com/emscripten-core/emscripten.git"

livecheck do
Expand All @@ -25,15 +26,20 @@ class Emscripten < Formula

depends_on "cmake" => :build
depends_on "binaryen"
# error "fatal error: '__config' file not found" when building llvm 12 on High Sierra
depends_on "node"
depends_on "[email protected]"
depends_on "yuicompressor"

# emscripten needs argument '-fignore-exceptions', which is only available
# starting in llvm >= 12
# emscripten needs argument '-fignore-exceptions', which is only available in llvm >= 12
# To find the correct llvm revision, find a corresponding commit at:
# https://github.com/emscripten-core/emsdk/blob/master/emscripten-releases-tags.txt
# Then take this commit and go to:
# https://chromium.googlesource.com/emscripten-releases/+/<commit>/DEPS
# Then use the listed llvm_project_revision for the resource below.
resource "llvm" do
url "https://github.com/llvm/llvm-project/archive/llvmorg-12-init.tar.gz"
sha256 "a8f00b95f81722009bdcc2cc07235fad752e5f539006621ad055023fe0d58987"
url "https://github.com/llvm/llvm-project.git",
revision: "25a8881b724abf7251a9278e72224af7e82cb9c2"
end

def install
Expand All @@ -47,14 +53,9 @@ def install
resource("llvm").stage do
projects = %w[
clang
clang-tools-extra
lld
lldb
polly
]
# OpenMP currently fails to build on ARM
# https://github.com/Homebrew/brew/issues/7857#issuecomment-661484670
projects << "openmp" unless Hardware::CPU.arm?

runtimes = %w[
compiler-rt
libcxx
Expand All @@ -78,7 +79,6 @@ def install
-DCMAKE_INSTALL_PREFIX=#{libexec}/llvm
-DLLVM_ENABLE_PROJECTS=#{projects.join(";")}
-DLLVM_ENABLE_RUNTIMES=#{runtimes.join(";")}
-DLLVM_POLLY_LINK_INTO_TOOLS=ON
-DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON
-DLLVM_LINK_LLVM_DYLIB=ON
-DLLVM_BUILD_LLVM_C_DYLIB=ON
Expand All @@ -91,7 +91,7 @@ def install
-DLLVM_INSTALL_UTILS=ON
-DLLVM_ENABLE_Z3_SOLVER=OFF
-DLLVM_OPTIMIZED_TABLEGEN=ON
-DLLVM_TARGETS_TO_BUILD=all
-DLLVM_TARGETS_TO_BUILD=host;WebAssembly
-DFFI_INCLUDE_DIR=#{Formula["libffi"].opt_lib}/libffi-#{Formula["libffi"].version}/include
-DFFI_LIBRARY_DIR=#{Formula["libffi"].opt_lib}
-DLLVM_CREATE_XCODE_TOOLCHAIN=#{MacOS::Xcode.installed? ? "ON" : "OFF"}
Expand Down