Skip to content

Commit

Permalink
node 17.0.1
Browse files Browse the repository at this point in the history
node: bump deps

node: build with LLVM on Mojave
  • Loading branch information
derekschinke authored and BrewTestBot committed Oct 22, 2021
1 parent 1bc4321 commit bcf936c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
File renamed without changes.
20 changes: 16 additions & 4 deletions Formula/node.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Node < Formula
desc "Platform built on V8 to build network applications"
homepage "https://nodejs.org/"
url "https://nodejs.org/dist/v16.12.0/node-v16.12.0.tar.xz"
sha256 "5f620a6a400901a6565aa0c07309cde3aab3dbaa765cecb934241de520d36bac"
url "https://nodejs.org/dist/v17.0.1/node-v17.0.1.tar.xz"
sha256 "6ec480f872cb7c34877044985e3d7bd89329ace5b8e2ad90b57980601786341c"
license "MIT"
head "https://github.com/nodejs/node.git", branch: "master"

Expand Down Expand Up @@ -30,13 +30,19 @@ class Node < Formula

uses_from_macos "zlib"

on_macos do
depends_on "llvm" => [:build, :test] if DevelopmentTools.clang_build_version <= 1100
end

on_linux do
depends_on "gcc"
end

fails_with :clang do
build 1099
cause "Node requires Xcode CLT 11+"
build 1100
cause <<~EOS
error: calling a private constructor of class 'v8::internal::(anonymous namespace)::RegExpParserImpl<uint8_t>'
EOS
end

fails_with gcc: "5"
Expand All @@ -60,6 +66,9 @@ class Node < Formula
end

def install
ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib
ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100)

# make sure subprocesses spawned by make are using our Python 3
ENV["PYTHON"] = Formula["python@3.9"].opt_bin/"python3"

Expand Down Expand Up @@ -140,6 +149,9 @@ def post_install
end

test do
# Make sure Mojave does not have `CC=llvm_clang`.
ENV.clang if OS.mac?

path = testpath/"test.js"
path.write "console.log('hello');"

Expand Down

0 comments on commit bcf936c

Please sign in to comment.