Created
March 16, 2016 01:45
-
-
Save EricWF/8a0bfb6ff02f8c9f9940 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/libcxx/test/config.py b/test/libcxx/test/config.py | |
index 6c52880..f1d60a3 100644 | |
--- a/test/libcxx/test/config.py | |
+++ b/test/libcxx/test/config.py | |
@@ -98,6 +98,7 @@ class Configuration(object): | |
self.configure_cxx_library_root() | |
self.configure_use_system_cxx_lib() | |
self.configure_use_clang_verify() | |
+ self.configure_use_thread_safety() | |
self.configure_execute_external() | |
self.configure_ccache() | |
self.configure_compile_flags() | |
@@ -218,6 +219,13 @@ class Configuration(object): | |
self.lit_config.note( | |
"inferred use_clang_verify as: %r" % self.use_clang_verify) | |
+ def configure_use_thread_safety(self): | |
+ has_thread_safety = self.cxx.hasCompileFlag('-Werror=thread-safety') | |
+ if has_thread_safety: | |
+ self.cxx.compile_flags += ['-Werror=thread-safety'] | |
+ self.config.available_features.add('thread-safety') | |
+ self.lit_config.note("enabling thread-safety annotations") | |
+ | |
def configure_execute_external(self): | |
# Choose between lit's internal shell pipeline runner and a real shell. | |
# If LIT_USE_INTERNAL_SHELL is in the environment, we use that as the | |
diff --git a/test/libcxx/test/format.py b/test/libcxx/test/format.py | |
index c21118a..865869a 100644 | |
--- a/test/libcxx/test/format.py | |
+++ b/test/libcxx/test/format.py | |
@@ -167,7 +167,7 @@ class LibcxxTestFormat(object): | |
# when using Clang. | |
extra_flags = [] | |
if self.cxx.type != 'gcc': | |
- extra_flags += ['-fsyntax-only', '-Werror=thread-safety'] | |
+ extra_flags += ['-fsyntax-only'] | |
if use_verify: | |
extra_flags += ['-Xclang', '-verify', | |
'-Xclang', '-verify-ignore-unexpected=note'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment