Skip to content

Commit

Permalink
llvm: fix test
Browse files Browse the repository at this point in the history
Homebrew/brew#2036 no longer rewrites @rpath in dylib IDs, which changes
the llvm bottle contents and requires a corresponding change in the test

Closes #10808.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
  • Loading branch information
ilovezfs committed Mar 9, 2017
1 parent 57a65b1 commit e1f36c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Formula/llvm.rb
Expand Up @@ -20,6 +20,7 @@ def message
class Llvm < Formula
desc "Next-gen compiler infrastructure"
homepage "http://llvm.org/"
revision 1

stable do
url "http://llvm.org/releases/3.9.1/llvm-3.9.1.src.tar.xz"
Expand Down Expand Up @@ -301,8 +302,8 @@ def caveats
}
EOS

system "#{bin}/clang", "-L#{lib}", "-fopenmp", "-nobuiltininc",
"-I#{lib}/clang/#{version}/include",
system "#{bin}/clang", "-L#{lib}", "-Wl,-rpath,#{lib}", "-fopenmp",
"-nobuiltininc", "-I#{lib}/clang/#{version}/include",
"omptest.c", "-o", "omptest"
testresult = shell_output("./omptest")

Expand Down Expand Up @@ -381,7 +382,7 @@ def caveats
"-I#{MacOS.sdk_path}/usr/include",
"-L#{lib}",
"-Wl,-rpath,#{lib}", "test.cpp", "-o", "test"
assert_includes MachO::Tools.dylibs("test"), "#{opt_lib}/libc++.1.dylib"
assert_includes MachO::Tools.dylibs("test"), "@rpath/libc++.1.dylib"
assert_equal "Hello World!", shell_output("./test").chomp
end
end
Expand Down

0 comments on commit e1f36c9

Please sign in to comment.