diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2019-05-14 21:58:59 +0000 |
---|---|---|
committer | Jordan Rupprecht <rupprecht@google.com> | 2019-05-14 21:58:59 +0000 |
commit | b6bc976d7be8ee56d3be4b6dbd2f3ab0a4021c86 (patch) | |
tree | f5ed5db8cb5d237a073ea00c4d4cd63153a16a6c /test/lit.common.cfg | |
parent | 05342ccc9cff16425c0a831fddd510879544a0bf (diff) | |
parent | 098ca93185735ec3687106d0967a70fc99a85059 (diff) | |
download | compiler-rt-b6bc976d7be8ee56d3be4b6dbd2f3ab0a4021c86.tar.gz |
Creating branches/google/stable and tags/google/stable/2019-05-14 from r360103google/stable
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/google/stable@360714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.common.cfg')
-rw-r--r-- | test/lit.common.cfg | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/test/lit.common.cfg b/test/lit.common.cfg index f06658ff2..0432325c6 100644 --- a/test/lit.common.cfg +++ b/test/lit.common.cfg @@ -60,7 +60,12 @@ if config.asan_shadow_scale != '': if config.android: # Prepend the flag so that it can be overridden. config.target_cflags = "-pie -fuse-ld=gold " + config.target_cflags - config.cxx_mode_flags.append('-stdlib=libstdc++') + if config.android_ndk_version < 19: + # With a new compiler and NDK < r19 this flag ends up meaning "link against + # libc++", but NDK r19 makes this mean "link against the stub libstdc++ that + # just contains a handful of ABI functions", which makes most C++ code fail + # to link. In r19 and later we just use the default which is libc++. + config.cxx_mode_flags.append('-stdlib=libstdc++') # Clear some environment variables that might affect Clang. possibly_dangerous_env_vars = ['ASAN_OPTIONS', 'DFSAN_OPTIONS', 'LSAN_OPTIONS', @@ -98,6 +103,9 @@ config.available_features.add(config.host_os.lower()) if re.match(r'^x86_64.*-linux', config.target_triple): config.available_features.add("x86_64-linux") +if config.have_zlib == "1": + config.available_features.add("zlib") + # Use ugly construction to explicitly prohibit "clang", "clang++" etc. # in RUN lines. config.substitutions.append( @@ -214,6 +222,10 @@ compiler_rt_debug = getattr(config, 'compiler_rt_debug', False) if not compiler_rt_debug: config.available_features.add('compiler-rt-optimized') +libdispatch = getattr(config, 'compiler_rt_intercept_libdispatch', False) +if libdispatch: + config.available_features.add('libdispatch') + sanitizer_can_use_cxxabi = getattr(config, 'sanitizer_can_use_cxxabi', True) if sanitizer_can_use_cxxabi: config.available_features.add('cxxabi') @@ -380,8 +392,9 @@ try: [os.path.join(config.llvm_tools_dir, 'llvm-config'), '--assertion-mode'], stdout = subprocess.PIPE, env=config.environment) -except OSError: - print("Could not find llvm-config in " + config.llvm_tools_dir) +except OSError as e: + print("Could not launch llvm-config in " + config.llvm_tools_dir) + print(" Failed with error #{0}: {1}".format(e.errno, e.strerror)) exit(42) if re.search(r'ON', llvm_config_cmd.stdout.read().decode('ascii')): @@ -393,18 +406,23 @@ llvm_config_cmd.wait() if platform.system() == 'Windows': config.test_retry_attempts = 2 -# Only run up to 3 64-bit sanitized processes simultaneously on Darwin. -# Using more scales badly and hogs the system due to inefficient handling -# of large mmap'd regions (terabytes) by the kernel. +# No throttling on non-Darwin platforms. +lit_config.parallelism_groups['shadow-memory'] = None + if platform.system() == 'Darwin': - lit_config.parallelism_groups["darwin-64bit-sanitizer"] = 3 - -# The current implementation of the tools in sanitizer_common/ios_comamnds -# do not support parallel execution so force sequential execution of the -# tests on iOS devices. -if config.host_os == 'Darwin' and config.apple_platform != "osx" and not config.apple_platform.endswith("sim"): - lit_config.warning("iOS device test cases being run sequentially") - lit_config.parallelism_groups["darwin-ios-device-sanitizer"] = 1 + ios_device = config.apple_platform != 'osx' and not config.apple_platform.endswith('sim') + # Force sequential execution when running tests on iOS devices. + if ios_device: + lit_config.warning('Forcing sequential execution for iOS device tests') + lit_config.parallelism_groups['ios-device'] = 1 + config.parallelism_group = 'ios-device' + + # Only run up to 3 processes that require shadow memory simultaneously on + # 64-bit Darwin. Using more scales badly and hogs the system due to + # inefficient handling of large mmap'd regions (terabytes) by the kernel. + elif config.target_arch in ['x86_64', 'x86_64h']: + lit_config.warning('Throttling sanitizer tests that require shadow memory on Darwin 64bit') + lit_config.parallelism_groups['shadow-memory'] = 3 # Multiple substitutions are necessary to support multiple shared objects used # at once. |