Index: lib/safestack/CMakeLists.txt =================================================================== --- lib/safestack/CMakeLists.txt +++ lib/safestack/CMakeLists.txt @@ -6,29 +6,14 @@ set(SAFESTACK_CFLAGS ${SANITIZER_COMMON_CFLAGS}) -if(APPLE) - # Build universal binary on APPLE. +foreach(arch ${SAFESTACK_SUPPORTED_ARCH}) add_compiler_rt_runtime(clang_rt.safestack STATIC - OS osx - ARCHS ${SAFESTACK_SUPPORTED_ARCH} + ARCHS ${arch} SOURCES ${SAFESTACK_SOURCES} - $ - $ - $ + $ + $ + $ CFLAGS ${SAFESTACK_CFLAGS} PARENT_TARGET safestack) -else() - # Otherwise, build separate libraries for each target. - foreach(arch ${SAFESTACK_SUPPORTED_ARCH}) - add_compiler_rt_runtime(clang_rt.safestack - STATIC - ARCHS ${arch} - SOURCES ${SAFESTACK_SOURCES} - $ - $ - $ - CFLAGS ${SAFESTACK_CFLAGS} - PARENT_TARGET safestack) - endforeach() -endif() +endforeach() Index: test/safestack/lit.cfg =================================================================== --- test/safestack/lit.cfg +++ test/safestack/lit.cfg @@ -18,5 +18,5 @@ if config.lto_supported: config.substitutions.append((r"%clang_lto_safestack ", ' '.join(config.lto_launch + [config.clang] + config.lto_flags + ['-fsanitize=safe-stack ']))) -if config.host_os not in ['Linux', 'FreeBSD', 'Darwin', 'NetBSD']: +if config.host_os not in ['Linux', 'FreeBSD', 'NetBSD']: config.unsupported = True Index: test/safestack/pthread.c =================================================================== --- test/safestack/pthread.c +++ test/safestack/pthread.c @@ -1,8 +1,6 @@ // RUN: %clang_safestack %s -pthread -o %t // RUN: %run %t -// XFAIL: darwin - // Test that pthreads receive their own unsafe stack. #include