diff options
Diffstat (limited to 'libcxx/test/libcxx/compiler.py')
| -rw-r--r-- | libcxx/test/libcxx/compiler.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libcxx/test/libcxx/compiler.py b/libcxx/test/libcxx/compiler.py index cb8542c64cd..24f7c36b783 100644 --- a/libcxx/test/libcxx/compiler.py +++ b/libcxx/test/libcxx/compiler.py @@ -193,6 +193,17 @@ class CXXCompiler(object): flags=flags) return rc == 0 + def addFlagIfSupported(self, flag): + if isinstance(flag, list): + flags = list(flag) + else: + flags = [flag] + if self.hasCompileFlag(flags): + self.flags += flags + return True + else: + return False + def addCompileFlagIfSupported(self, flag): if isinstance(flag, list): flags = list(flag) |

