emscripten: fix HEAD build (#6475)
This commit is contained in:
parent
1814905452
commit
0ea5a49ada
1 changed files with 20 additions and 2 deletions
|
@ -33,6 +33,8 @@ class Emscripten < Formula
|
||||||
resource "fastcomp-clang" do
|
resource "fastcomp-clang" do
|
||||||
url "https://github.com/kripken/emscripten-fastcomp-clang.git", :branch => "incoming"
|
url "https://github.com/kripken/emscripten-fastcomp-clang.git", :branch => "incoming"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
depends_on "cmake" => :build
|
||||||
end
|
end
|
||||||
|
|
||||||
needs :cxx11
|
needs :cxx11
|
||||||
|
@ -59,7 +61,7 @@ class Emscripten < Formula
|
||||||
(buildpath/"fastcomp").install resource("fastcomp")
|
(buildpath/"fastcomp").install resource("fastcomp")
|
||||||
(buildpath/"fastcomp/tools/clang").install resource("fastcomp-clang")
|
(buildpath/"fastcomp/tools/clang").install resource("fastcomp-clang")
|
||||||
|
|
||||||
args = [
|
configure_args = [
|
||||||
"--prefix=#{libexec}/llvm",
|
"--prefix=#{libexec}/llvm",
|
||||||
"--enable-optimized",
|
"--enable-optimized",
|
||||||
"--enable-targets=host,js",
|
"--enable-targets=host,js",
|
||||||
|
@ -67,8 +69,24 @@ class Emscripten < Formula
|
||||||
"--disable-bindings",
|
"--disable-bindings",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
cmake_args = std_cmake_args.reject { |s| s["CMAKE_INSTALL_PREFIX"] }
|
||||||
|
cmake_args += [
|
||||||
|
"-DCMAKE_INSTALL_PREFIX=#{libexec}/llvm",
|
||||||
|
"-DLLVM_TARGETS_TO_BUILD=X86;JSBackend",
|
||||||
|
"-DLLVM_INCLUDE_EXAMPLES=OFF",
|
||||||
|
"-DLLVM_INCLUDE_TESTS=OFF",
|
||||||
|
"-DCLANG_INCLUDE_EXAMPLES=OFF",
|
||||||
|
"-DCLANG_INCLUDE_TESTS=OFF",
|
||||||
|
"-DOCAMLFIND=/usr/bin/false",
|
||||||
|
"-DGO_EXECUTABLE=/usr/bin/false",
|
||||||
|
]
|
||||||
|
|
||||||
mkdir "fastcomp/build" do
|
mkdir "fastcomp/build" do
|
||||||
system "../configure", *args
|
if build.head?
|
||||||
|
system "cmake", "..", *cmake_args
|
||||||
|
else
|
||||||
|
system "../configure", *configure_args
|
||||||
|
end
|
||||||
system "make"
|
system "make"
|
||||||
system "make", "install"
|
system "make", "install"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue