[Openmp-commits] [openmp] r258171 - Merging r258169:
Hans Wennborg via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 19 11:30:04 PST 2016
Author: hans
Date: Tue Jan 19 13:30:01 2016
New Revision: 258171
URL: http://llvm.org/viewvc/llvm-project?rev=258171&view=rev
Log:
Merging r258169:
------------------------------------------------------------------------
r258169 | hans | 2016-01-19 11:26:43 -0800 (Tue, 19 Jan 2016) | 4 lines
lit.cfg: Pass -isysroot to the SDK on Darwin
Newly-built Clangs don't automatically find the SDK, and newer versions
of Mac OS X don't provide it under /usr/include etc.
------------------------------------------------------------------------
Modified:
openmp/branches/release_38/ (props changed)
openmp/branches/release_38/runtime/test/lit.cfg
Propchange: openmp/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 19 13:30:01 2016
@@ -1 +1 @@
-/openmp/trunk:257833
+/openmp/trunk:257833,258169
Modified: openmp/branches/release_38/runtime/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/openmp/branches/release_38/runtime/test/lit.cfg?rev=258171&r1=258170&r2=258171&view=diff
==============================================================================
--- openmp/branches/release_38/runtime/test/lit.cfg (original)
+++ openmp/branches/release_38/runtime/test/lit.cfg Tue Jan 19 13:30:01 2016
@@ -2,6 +2,7 @@
# Configuration file for the 'lit' test runner.
import os
+import subprocess
import lit.formats
# Tell pylint that we know config and lit_config exist somewhere.
@@ -57,6 +58,16 @@ if config.operating_system == 'Darwin':
if config.using_hwloc:
config.test_cflags += " -Wl,-rpath," + config.hwloc_library_dir
+# Find the SDK on Darwin
+if config.operating_system == 'Darwin':
+ cmd = subprocess.Popen(['xcrun', '--show-sdk-path'],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = cmd.communicate()
+ out = out.strip()
+ res = cmd.wait()
+ if res == 0 and out:
+ config.test_cflags += " -isysroot " + out
+
# substitutions
config.substitutions.append(("%libomp-compile-and-run", \
"%clang %cflags %s -o %t -lm && %t"))
More information about the Openmp-commits
mailing list