[PATCH] D37646: [ubsan-minimal] Enable on Darwin
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 13:24:10 PDT 2017
vsk added inline comments.
================
Comment at: lib/ubsan_minimal/CMakeLists.txt:20
- # Standalone UBSan runtimes.
- add_compiler_rt_runtime(clang_rt.ubsan_minimal
- STATIC
- ARCHS ${UBSAN_SUPPORTED_ARCH}
- OBJECT_LIBS RTUbsan_minimal
- CFLAGS ${UBSAN_CFLAGS}
- PARENT_TARGET ubsan-minimal)
-
- add_compiler_rt_runtime(clang_rt.ubsan_minimal
- SHARED
- ARCHS ${UBSAN_SUPPORTED_ARCH}
- OBJECT_LIBS RTUbsan_minimal
- CFLAGS ${UBSAN_CFLAGS}
- LINK_LIBS ${UBSAN_DYNAMIC_LIBS}
- PARENT_TARGET ubsan-minimal)
-
- if (UNIX)
- set(ARCHS_FOR_SYMBOLS ${UBSAN_SUPPORTED_ARCH})
- list(REMOVE_ITEM ARCHS_FOR_SYMBOLS i386 i686)
- add_sanitizer_rt_symbols(clang_rt.ubsan_minimal
- ARCHS ${ARCHS_FOR_SYMBOLS}
- PARENT_TARGET ubsan-minimal
- EXTRA ubsan.syms.extra)
+ if(APPLE)
+ # Common parts of UBSan runtime.
----------------
eugenis wrote:
> Looks like the only difference between apple and non-apple is in the OS argument, and that is ignored by add_compiler_rt_* macros on non-apple.
> Could these branches be merged?
>
Thanks, yes it can! It looks like the OS argument is just ignored when "APPLE" is not defined.
https://reviews.llvm.org/D37646
More information about the llvm-commits
mailing list