diff --git a/libcxx/utils/libcxx/test/dsl.py b/libcxx/utils/libcxx/test/dsl.py --- a/libcxx/utils/libcxx/test/dsl.py +++ b/libcxx/utils/libcxx/test/dsl.py @@ -222,12 +222,16 @@ self._compileFlag = compileFlag self._linkFlag = linkFlag self._isSupported = when + self.__cachedIsSupported = None def isSupported(self, config): """ Return whether the feature is supported by the given TestingConfig. """ - return self._isSupported(config) + if self.__cachedIsSupported is None: + self.__cachedIsSupported = self._isSupported(config) + assert self.__cachedIsSupported is not None, "Should return True or False" + return self.__cachedIsSupported def enableIn(self, config): """