Work around -Werror,-Wunused-macros with clang-cl
clang-cl as-is does not provide the intrinsics provided by MSVC; you need to explicitly include Intrin.h (provided by clang) for that. So, as a hack, specify CC/CXX as clang-cl.exe -FIIntrin.h ... to have the intrinsics always available. But Intrin.h includes stdlib.h, so by the time sal/osl/w32/random.c defines _CRT_RAND_S before including stdlib.h, the latter has already been included without _CRT_RAND_S support. So, as a second hack, specify CC rather as clang-cl.exe -D_CRT_RAND_S= -FIIntrin.h ... But then clang-cl starts to emit -Werror,-Wunused-macros, as defining _CRT_RAND_S in the main file has no effect here. Change-Id: I5dfe9872dea7e8eb476d9260f17ab8d8893f48af
Showing
Please
register
or
sign in
to comment