summaryrefslogtreecommitdiffstats
path: root/clang/test/lit.cfg
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2014-06-10 14:22:00 +0000
committerAlexander Potapenko <glider@google.com>2014-06-10 14:22:00 +0000
commit14f8ac04e3ecfe097653bda84b8cf4777fb91f17 (patch)
tree2aa5300f46ae590f2b88f582e8fc4a7a0287f0db /clang/test/lit.cfg
parent9cc3ebdd3b846b34ded9c6fb81f997b091168ef6 (diff)
downloadbcm5719-llvm-14f8ac04e3ecfe097653bda84b8cf4777fb91f17.tar.gz
bcm5719-llvm-14f8ac04e3ecfe097653bda84b8cf4777fb91f17.zip
Add detection of OS X relocatable SDK to compiler-rt as a lit.util function
Clang's lit cfg already detects the currently selected SDK via "xcrun --show-sdk-path". The same thing should be done for compiler-rt tests, to make them work on recent OS X versions. Instead of duplicating the detection code, this patch extracts the detection function into a lit.util method. Patch by Kuba Brecka (kuba.brecka@gmail.com), reviewed at http://reviews.llvm.org/D4072 llvm-svn: 210534
Diffstat (limited to 'clang/test/lit.cfg')
-rw-r--r--clang/test/lit.cfg16
1 files changed, 1 insertions, 15 deletions
diff --git a/clang/test/lit.cfg b/clang/test/lit.cfg
index 5c2b187791f..11e8e0b1427 100644
--- a/clang/test/lit.cfg
+++ b/clang/test/lit.cfg
@@ -471,18 +471,4 @@ gmalloc_path_str = lit_config.params.get('gmalloc_path',
if use_gmalloc:
config.environment.update({'DYLD_INSERT_LIBRARIES' : gmalloc_path_str})
-# On Darwin, support relocatable SDKs by providing Clang with a
-# default system root path.
-if 'darwin' in config.target_triple:
- try:
- cmd = subprocess.Popen(['xcrun', '--show-sdk-path'],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- out, err = cmd.communicate()
- out = out.strip()
- res = cmd.wait()
- except OSError:
- res = -1
- if res == 0 and out:
- sdk_path = out
- lit_config.note('using SDKROOT: %r' % sdk_path)
- config.environment['SDKROOT'] = sdk_path
+lit.util.usePlatformSdkOnDarwin(config, lit_config)
OpenPOWER on IntegriCloud