Displaying 20 results from an estimated 74 matches for "cmake_cxx_flag".
Did you mean:
cmake_cxx_flags
2016 Nov 17
2
"-stdlib=libc++" applied to CMAKE_CXX_FLAGS
llvm/cmake/modules/HandleLLVMStdlib.cmake specifies "-stdlib=libc++" for
CMAKE_CXX_FLAGS when LLVM_ENABLE_LIBCXX and CXX_SUPPORTS_STDLIB. From what
I can see this is a flag intended for the linker and not the compiler.
I'd like to submit a change to delete CMAKE_CXX_FLAGS from this append() but
I wanted to check in with the list to see if that makes sense or if there
are othe...
2014 Mar 22
2
[LLVMdev] compiler-rt CMake build ignores CMAKE_CXX_FLAGS
Hello,
It looks like compiler-rt CMake scripts don't take CMAKE_CXX_FLAGS
into account. This is because clang_compile and clang_link_shared
functions call the newly-built compiler directly, and they don't add
those flags.
Using CMAKE_CXX_FLAGS is necessary on systems where the C++11-enabled
libstdc++ is installed not in the default location. For example, the
Cent...
2014 Mar 24
2
[LLVMdev] compiler-rt CMake build ignores CMAKE_CXX_FLAGS
...3.
On Sun, Mar 23, 2014 at 10:03 PM, Alexey Samsonov <samsonov at google.com>wrote:
> Hi Dmitri,
>
> On Sat, Mar 22, 2014 at 11:50 PM, Dmitri Gribenko <gribozavr at gmail.com>wrote:
>
>> Hello,
>>
>> It looks like compiler-rt CMake scripts don't take CMAKE_CXX_FLAGS
>> into account. This is because clang_compile and clang_link_shared
>> functions call the newly-built compiler directly, and they don't add
>> those flags.
>>
>
> Indeed.
>
>
>>
>> Using CMAKE_CXX_FLAGS is necessary on systems where the C++11-e...
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...;)
set(CMAKE_BUILD_TYPE Debug)
endif()
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -undefined
dynamic_lookup")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined
dynamic_lookup")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra
-Wno-unused-parameter")
# While just setting LLVM_DIR will make find_package work, you need to
# add it to CMAKE_MODULE_PATH if you want to include AddLLVM, e.g., if
# you want to use add_l...
2015 Jul 20
3
[LLVMdev] CMake does not propagate flags to build
Hey Pete,
I also tried CMAKE_CXX_FLAGS_RELEASE
with the same effect.
On Mon, Jul 20, 2015, at 09:34 AM, Pete Cooper wrote:
> Hi Adrian
>
> I’m not sure if the CMAKE_CXX_FLAGS is used in LLVM. We have our own
> flags for different configurations. I don’t remember if our ones inherit
> from CMAKE_CXX_FLAGS or override...
2014 Mar 31
2
[LLVMdev] r204593 breaks Asan tests on FreeBSD
...ome other people as
> well?
>
+llvmdev
Oh, sure. Please cc' llvmdev mailing list for the discussion of sanitizers,
especially when discussing portability issues,
as more people might be interested in that or share their experience.
> On FreeBSD 9.2 I add a couple custom options to CMAKE_CXX_FLAGS in
>> order to let clang know which header set it should use, like that:
>>
>> CC=clang CXX=clang++ cmake \
>> -DLLVM_TARGETS_TO_BUILD=X86 \
>> -DCMAKE_CXX_FLAGS="-I/usr/include/c++/4.8.1
>> -I/usr/include/c++/4.8.1/x86_64-unknown-freebsd9.2"
>&...
2015 Jul 20
3
[LLVMdev] CMake does not propagate flags to build
I regularly use '-DCMAKE_CXX_FLAGS' when configuring CLang/LLVM to distinguish my builds (Alpha/Beta/Final) or to build custom versions, usually by adding additional '-D' flags, but I discovered I had to add the ':STRING' qualifier to it when invoking 'cmake'. With 'gmake' this is equivalent to...
2015 Jul 20
2
[LLVMdev] CMake does not propagate flags to build
...cf3afb822df6a6e/CMakeLists.txt#L207
>
> Everything is correctly built with -fno-omit-frame-pointer.
>
> Any suggestion why it would be the case?
>
> Thanks,
> Adrian
>
> On Mon, Jul 20, 2015, at 01:39 PM, Martin J. O'Riordan wrote:
> > I regularly use '-DCMAKE_CXX_FLAGS' when configuring CLang/LLVM to
> > distinguish my builds (Alpha/Beta/Final) or to build custom versions,
> > usually by adding additional '-D' flags, but I discovered I had to add
> > the ':STRING' qualifier to it when invoking 'cmake'. With 'gma...
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...gt;
> if(APPLE)
> set(CMAKE_MACOSX_RPATH ON)
> set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -undefined
> dynamic_lookup")
> set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined
> dynamic_lookup")
> endif()
>
> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
>
> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra
> -Wno-unused-parameter")
>
> # While just setting LLVM_DIR will make find_package work, you need to
> # add it to CMAKE_MODULE_PATH if you want to include AddLLVM, e.g....
2012 Mar 13
2
[LLVMdev] llvm-config --cxxflags does not give the result the configuration script wants?
...FLAGS. But Although I see that, under my platform, almost
all the the files inside LLVM and Clang are compiled with -fno-rtti, the
llvm-config --cxxflags does not give the correct flags that those files are
compiled. The following are something I thought is valuable to mention here:
As I probe the CMAKE_CXX_FLAGS of some of the CMakeLists.txt, I found there
is a "baseline" of this variable, mine is "-fPIC
-fvisibility-inlines-hidden". It means, no matter how a single
CMakeLists.txt changes CMAKE_CXX_FLAGS, it will remain the same when it
goes into another CMakeLists.txt.
Inside the llv...
2016 Jan 13
4
CMake option to disable LTO?
Hello LLVM,
When building LLVM/Clang (debug build), linking takes too long. I
notice that LTO is enabled now and guess that's to blame. Is there a
CMAKE config option to disable LTO linking? I can't seem to find
anything.
Thanks,
-steve
2015 Jul 18
2
[LLVMdev] CMake does not propagate flags to build
'-DCMAKE_CXX_FLAGS=-fno-omit-frame-pointer -Wno-maybe-uninitialized
-fPIC -fPIE'
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler:
/home/engshare/third-party2/gcc/4.8.1/centos6-native/cc6c9dc/bin/gcc
-- Check for working C compiler:
/ho...
2014 Apr 01
2
[LLVMdev] r204593 breaks Asan tests on FreeBSD
On Tue, Apr 1, 2014 at 1:23 PM, Ivan A. Kosarev <ivan at ivan-labs.com> wrote:
> Hi Alexey,
>
>
> On 03/31/2014 09:58 PM, Alexey Samsonov wrote:
>
> On FreeBSD 9.2 I add a couple custom options to CMAKE_CXX_FLAGS in order
> to let clang know which header set it should use, like that:
>
>>
>>> CC=clang CXX=clang++ cmake \
>>> -DLLVM_TARGETS_TO_BUILD=X86 \
>>> -DCMAKE_CXX_FLAGS="-I/usr/include/c++/4.8.1
>>> -I/usr/include/c++/4.8.1/x86_64-unknown-freeb...
2016 Oct 09
3
Embedding llvm as a git submodule in Project
Hi all.
I want to use llvm in my project and I want to make llvm a git submodule
in my project.
http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project
At this in the documentation it claims to describe how to embed llvm
into a project. I tried it that way but it doesn't work, because there
isn't any findLLVM.cmake in the llvm/cmake/modules directory anymore (i
don't
2016 Jun 19
2
Linker failures in debug build - compiler/linker poll?
...@ endif()
if(NOT WIN32 AND NOT CYGWIN)
# MinGW warns if -fvisibility-inlines-hidden is used.
check_cxx_compiler_flag("-fvisibility-inlines-hidden"
SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
- append_if(SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
"-fvisibility-inlines-hidden" CMAKE_CXX_FLAGS)
+
+ # The flag also hides inlines from explicit template instantiations,
which
+ # leads to link failures in debug builds at least with gcc 5.3.1 and
+ # both GNU ld 2.26 or gold 1.11.
+ if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+ append_if(SUPPORTS_FVISIBILITY_INLINES...
2013 Feb 05
2
[LLVMdev] CMake, compiler-rt, and MacOS
...#39;m often busy. You're better off using the development mailing
list for questions such as this, and I've moved the conversation there.
> I have a problem compiling compiler-rt on MacOS with libc++. For this to
> work, the flag -mmacosx-version-min=10.7 is required, so I use:
> CMAKE_CXX_FLAGS:STRING=-mmacosx-version-min=10.7 -stdlib=libc++
>
> However, around line 140, the CMakeLists.txt of compiler-rt contains:
> if(APPLE)
> list(APPEND SANITIZER_COMMON_CFLAGS -mmacosx-version-min=10.5)
> endif()
>
> Now, when building with clang, the minimal minimal version is...
2017 Jul 29
2
Compiling LLVM to LLVM IR
Hello everyone,
I'm trying to compile LLVM and Clang into LLVM IR with debug info. I know that clang++ -g2 -S -emit-llvm <filename> does this, but I'm unfamiliar with CMake.
I tried changing CMAKE_CXX_FLAGS in CMakeCache.txt to "clang++ -g2 -S -emit-llvm," "-g2 -S -emit-llvm," and "-emit-llvm," but everything I tried resulted in a failed build, and/or .o files that didn't look like LLVM IR files when I opened them up. Where is the right place to pass these flags in?...
2011 Oct 24
0
[LLVMdev] build warnings
...MakeFiles/clangStaticAnalyzerCore.dir/M
> emRegion.cpp.o
> Linking CXX shared library ../../../../lib/liblibclang.so
I am suspicious, I guess you might not enable optimization on cmake build.
1) make sure with "make VERBOSE=1"
2) make sure you would set proper CMAKE_BUILD_TYPE, or CMAKE_CXX_FLAGS.
...Takumi
2013 Feb 05
2
[LLVMdev] CMake, compiler-rt, and MacOS
...development mailing
>> list for questions such as this, and I've moved the conversation there.
>>
>>
>>> I have a problem compiling compiler-rt on MacOS with libc++. For this to
>>> work, the flag -mmacosx-version-min=10.7 is required, so I use:
>>> CMAKE_CXX_FLAGS:STRING=-mmacosx-version-min=10.7 -stdlib=libc++
>>>
>>> However, around line 140, the CMakeLists.txt of compiler-rt contains:
>>> if(APPLE)
>>> list(APPEND SANITIZER_COMMON_CFLAGS -mmacosx-version-min=10.5)
>>> endif()
>>>
>>> Now, w...
2016 Mar 18
2
Building with LLVM_PARALLEL_XXX_JOBS
...oolchain/llvm-build
>
> Do you need more input?
>
> Thanks!
>
I found in "http://llvmweekly.org/issue/110"
[ llvm.src/cmake/modules/HandleLLVMOptions.cmake ]
option(LLVM_ENABLE_LTO "Enable link-time optimization" OFF)
append_if(LLVM_ENABLE_LTO "-flto"
CMAKE_CXX_FLAGS
CMAKE_C_FLAGS
CMAKE_EXE_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS)
Searching for...
$ grep LLVM_ENABLE_LTO llvm/cmake/modules/HandleLLVMOptions.cmake
[ OUTPUT EMPTY ]
...gives no output.
So, LLVM_ENABLE_LTO is not available for LLVM/Clang v3.8.0?!
Hmm, maybe I can backport (or git cherry-pick) S...