[PATCH] D30591: Introduce the feature "linux" for tests only for linux

Taewook Oh via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 3 13:37:46 PST 2017


twoh created this revision.

This feature is needed to re-enable https://reviews.llvm.org/rL293004, which resembles gcc's behavior in
finding the input file name from a preprocessed source. The patch has been
reverted in https://reviews.llvm.org/rL293032, because the test checks FILE symbol of ELF file, which is
not valid on OSes not using ELF. With the patch, we can add "REQUIRES: linux"
to the tests on ELF files, or tests that require any linux-specific features.


https://reviews.llvm.org/D30591

Files:
  test/lit.cfg


Index: test/lit.cfg
===================================================================
--- test/lit.cfg
+++ test/lit.cfg
@@ -427,6 +427,10 @@
 if not re.match(r'.*-(cygwin)$', config.target_triple):
     config.available_features.add('clang-driver')
 
+# Set on linux environment
+if re.match(r'.*-linux', config.target_triple):
+    config.available_features.add("linux")
+
 # [PR18856] Depends to remove opened file. On win32, a file could be removed
 # only if all handles were closed.
 if platform.system() not in ['Windows']:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30591.90530.patch
Type: text/x-patch
Size: 532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170303/78fff8fc/attachment.bin>


More information about the cfe-commits mailing list