[compiler-rt] r243446 - Let cmake infer source file language by the file extension.
Douglas Katzman
dougk at google.com
Tue Jul 28 09:52:42 PDT 2015
Author: dougk
Date: Tue Jul 28 11:52:42 2015
New Revision: 243446
URL: http://llvm.org/viewvc/llvm-project?rev=243446&view=rev
Log:
Let cmake infer source file language by the file extension.
This applies default compiler flags to .S files, in particular removing
the "-pedantic" option, which is desirable because there is nothing to
reasonably warn about; and the only thing that gcc warns about is that
you allegedly can't correctly invoke GLUE2 in lib/builtins/assembly.h
on platforms for which USER_LABEL_PREFIX is the empty string.
In the gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33305 that
added the warning, a commenter notes that giving a macro of zero characters
to another macro is not precisely the same as failing to supply an argument,
and "there is a widespread belief in C++ community that such usage is valid".
Unfortunately the only way to silence the warning is to avoid -pedantic.
Differential Revision: http://reviews.llvm.org/D10713
Modified:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/lib/builtins/CMakeLists.txt
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=243446&r1=243445&r2=243446&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Tue Jul 28 11:52:42 2015
@@ -9,7 +9,7 @@
# Check if compiler-rt is built as a standalone project.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
- project(CompilerRT C CXX)
+ project(CompilerRT C CXX ASM)
set(COMPILER_RT_STANDALONE_BUILD TRUE)
else()
set(COMPILER_RT_STANDALONE_BUILD FALSE)
Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=243446&r1=243445&r2=243446&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Tue Jul 28 11:52:42 2015
@@ -286,7 +286,6 @@ if (NOT WIN32 OR MINGW)
endif ()
endforeach ()
- set_source_files_properties(${${arch}_SOURCES} PROPERTIES LANGUAGE C)
add_compiler_rt_runtime(clang_rt.builtins-${arch} ${arch} STATIC
SOURCES ${${arch}_SOURCES}
CFLAGS "-std=c99")
More information about the llvm-commits
mailing list