Displaying 20 results from an estimated 34 matches for "cmake_c_flags".
Did you mean:
dcmake_c_flags
2015 Jan 27
2
[LLVMdev] CMake: Gold linker detection
...was trying to build runtime libraries (compiler-rt) for ARM using clang
which includes this code.
A while ago, I saw the error message until geek4civic fixed it with
ERROR_QUIET.
I usually specify my sysroot and tool chain(linker) through CFLAGS.
To fortify the logic, ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -Wl, --version
would be ideal than ${CMAKE_C_COMPILER} -Wl, --version which works mostly
for gnu compilers.
Let me know, I can push a patch
execute_process(
- COMMAND ${CMAKE_C_COMPILER} -Wl,--version
+ COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -Wl,--version
OUTPUT_...
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 Jan 28
2
[LLVMdev] CMake: Gold linker detection
..., I have a cross compiler for ARM and I usually compile the code with
Clang –sysroot=<path_to_sysroot> --gcc-toolchain=<path_to_toolchain> -target=<triple> file.c
Where I pass “–sysroot=<path_to_sysroot> --gcc-toolchain=<path_to_toolchain> -target=<triple>” as CMAKE_C_FLAGS :)
With out –gcc-toolchain, clang cannot find the linker and picks the system linker which is usually /usr/bin/ld on a linux system.
--Sumanth G
From: C Bergström [mailto:cbergstrom at pathscale.com]
Sent: Tuesday, January 27, 2015 11:51 AM
To: Sumanth Gundapaneni
Cc: llvmdev at cs.uiuc.e...
2012 Mar 28
2
[LLVMdev] Building past few days with Clang++ and Clang produces errors on Cmake for Debian Linux
...der /usr/local/bin... /clang .../clang++ as follows:
> mdriftmeyer at horus:~/DeveloperProjects/LLVMProject/cmake-llvm$ cmake
> -DCMAKE_BUILD_TYPE=MinSizeRel
> -DCMAKE_CXX_COMPILER=/usr/local/bin/clang++
> -DCMAKE_C_COMPILER=/usr/local/bin/clang -DCMAKE_CXX_FLAGS='-O2'
> CMAKE_C_FLAGS='-O2' -DLLVM_BUILD_EXAMPLES=ON -DLLVM_BUILD_TESTS=ON
> -DLLVM_INCLUDE_TESTS=ON
> -DLLVM_TARGETS_TO_BUILD='ARM;CppBackend;PTX;Hexagon;X86' ../trunk/llvm/
> -- Target triple: x86_64-unknown-linux-gnu
> -- Native target architecture is X86
> -- Threads enabled.
> --...
2015 Sep 18
4
Heads up: Bug in CMake found when attempting 64-bit build with 32-bit clang-cl.
Hi Nico, Hans, Takumi,
I made it to the bottom of the issue. Turns out that
CMAKE_C_FLAGS=-m64
CMAKE_CXX_FLAGS=-m64
CMAKE_EXE_LINKER_FLAGS=/machine:x64
is enough to do a 64-bit build correctly with a 32-bit clang-cl (i.e. one
that targets 32-bit by default). Hooray! The missing piece that I had to
track down is why I would see `deps = msvc` stuff spewing onto my terminal,
rather than co...
2016 Mar 18
2
Building with LLVM_PARALLEL_XXX_JOBS
...ild
>
> 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) SVN r259766.
-...
2017 Aug 24
3
Building LLVM's fuzzers
...> index 04596a6ff63..5465d8d95ba 100644
> --- a/cmake/modules/HandleLLVMOptions.cmake
> +++ b/cmake/modules/HandleLLVMOptions.cmake
> @@ -665,6 +665,9 @@ if(LLVM_USE_SANITIZER)
> endif()
> if (LLVM_USE_SANITIZE_COVERAGE)
> append("-fsanitize=fuzzer-no-link" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
> +
> + # Dead stripping messes up coverage instrumentation.
> + set(LLVM_NO_DEAD_STRIP ON)
> endif()
> endif()
>
> Any arguments against that?
We shouldn't do this. We really only want to prevent dead stripping of
the counters themselves - disab...
2018 Feb 26
0
Compiling a benchmark to IR (either from test-suite, or other benchmarks)
There is no immediate support for this in the test-suite cmake buildsystem. There is something in the Makefile system indeed, but it lacks documentation and I'm not aware of any examples of how to use it.
I would recommend to use `CMAKE_C_FLAGS=--save-temps=obj cmake ...` in the test-suite. The --save-temps=obj flag will make clang place a bitcode file next to each .o file.
- Matthias
> On Feb 26, 2018, at 9:42 AM, Gus Smith via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hello all.
>
> I'm in need of a...
2010 Mar 06
0
[LLVMdev] [PATCH]: MSVC build enhancements
...URE_SCL=1 (which is the default
setting). The right thing here is to use an option.
> - add_llvm_definitions("/${LLVM_USE_CRT}")
> + # http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F
> + foreach(flag_var
> + CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
> + CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
> + if(${flag_var} MATCHES "/MD")
> +...
2017 Aug 24
5
Building LLVM's fuzzers
(kcc, george: sorry for the re-send, the first was from a non-list email
address)
My configuration for building the fuzzers in the LLVM tree doesn't seem to
work any more (possibly as of moving libFuzzer to compiler-rt, but there
have been a few other changes in the last week or so that may be related).
I'm building with a fresh top-of-tree clang and setting
-DLLVM_USE_SANITIZER=Address
2018 Feb 26
2
Compiling a benchmark to IR (either from test-suite, or other benchmarks)
Hello all.
I'm in need of a benchmark that can be compiled to IR or bytecode. I found
the test-suite project (https://llvm.org/docs/TestSuiteMakefileGuide.html)
and thought a benchmark in that project might work. However, I'm having
trouble figuring out how to actually compile any of the benchmarks to IR or
bytecode. Using cmake and make I can compile them to binaries, but at no
point do
2017 Aug 24
3
Building LLVM's fuzzers
...d95ba 100644
> > --- a/cmake/modules/HandleLLVMOptions.cmake
> > +++ b/cmake/modules/HandleLLVMOptions.cmake
> > @@ -665,6 +665,9 @@ if(LLVM_USE_SANITIZER)
> > endif()
> > if (LLVM_USE_SANITIZE_COVERAGE)
> > append("-fsanitize=fuzzer-no-link" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
> > +
> > + # Dead stripping messes up coverage instrumentation.
> > + set(LLVM_NO_DEAD_STRIP ON)
> > endif()
> > endif()
> >
> > Any arguments against that?
>
> We shouldn't do this. We really only want to prevent dead...
2020 Jul 30
2
Help with build
...or the GCC compiler
CMAKE_C_COMPILER_AR:FILEPATH=C:/MinGW/bin/gcc-ar.exe
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_RANLIB:FILEPATH=C:/MinGW/bin/gcc-ranlib.exe
//Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=
//Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g
//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags...
2014 Oct 09
4
[LLVMdev] Remaining Compiler-RT failures in ARM
Folks,
As of this run:
http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-full/builds/746
There are three classes of failures that need fixing before we get the
bot green:
1. AddressSanitizer.BuiltinLongJmpTest Unit Test
Two configurations fail:
* Asan-arm-inline-Test
* Asan-arm-with-calls-Test
I wonder what's the best way to run it individually and reduce the
error. I'm not
2016 Dec 20
0
(Thin)LTO llvm build
...LE_LTO=THIN.
Teresa, I think it would be valuable to update llvm/cmake/modules/HandleLLVMOptions.cmake and make sure 1) either LLD or GOLD is used, 2) add the relevant plugin flags if needed.
if(uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
append("-flto=thin" CMAKE_CXX_FLAGS CMAKE_C_FLAGS
CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
# On darwin, enable the lto cache. This improves initial build time a little
# since we re-link a lot of the same objects, and significantly improves
# incremental build time.
append_if(APPLE "-Wl,-cache_path_lto,$...
2017 Aug 24
2
Building LLVM's fuzzers
...es/HandleLLVMOptions.cmake
>>> > +++ b/cmake/modules/HandleLLVMOptions.cmake
>>> > @@ -665,6 +665,9 @@ if(LLVM_USE_SANITIZER)
>>> > endif()
>>> > if (LLVM_USE_SANITIZE_COVERAGE)
>>> > append("-fsanitize=fuzzer-no-link" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
>>> > +
>>> > + # Dead stripping messes up coverage instrumentation.
>>> > + set(LLVM_NO_DEAD_STRIP ON)
>>> > endif()
>>> > endif()
>>> >
>>> > Any arguments against that?
>>>
>...
2019 May 01
3
Fix builds on MacOS Mojave [patch]
Hi!
I get build failures on Macos 10.14 Mojave.
How-to-repeat:
$ git clone <llvm-project>
$ cd llvm-project && mkdir build && cd build
$ cmake -G"Unix Makefiles" ../llvm
$ make # or "make -j${N}"
:
Building
:
In file included from /Users/marmur02/git/llvm-project/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp:20:
In file included from
2011 Jan 27
0
[LLVMdev] CMake-generated llvm-config.
...should not affect them at
all. If their frontend is integrated on the LLVM cmake build system,
they can switch off -pedantic (on svn LLVM) putting this at the top of
their CMakeLists.txt:
llvm_replace_compiler_option(CMAKE_CXX_FLAGS, "-pedantic" "")
llvm_replace_compiler_option(CMAKE_C_FLAGS, "-pedantic" "")
2017 Mar 21
2
why there is no libclang_rt.asan-x86_64-android.so
Hi all,
I want to do fuzzing test on Intel x86_64 platform, however I cannot find the shared library for libclang_rt.asan-x86_64-android.so, can anyone tell me where I can find this library?
Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170321/36eda3f1/attachment.html>
2017 Aug 24
4
Building LLVM's fuzzers
...gt; > +++ b/cmake/modules/HandleLLVMOptions.cmake
>> >>> > @@ -665,6 +665,9 @@ if(LLVM_USE_SANITIZER)
>> >>> > endif()
>> >>> > if (LLVM_USE_SANITIZE_COVERAGE)
>> >>> > append("-fsanitize=fuzzer-no-link" CMAKE_C_FLAGS
>> CMAKE_CXX_FLAGS)
>> >>> > +
>> >>> > + # Dead stripping messes up coverage instrumentation.
>> >>> > + set(LLVM_NO_DEAD_STRIP ON)
>> >>> > endif()
>> >>> > endif()
>> >>> >...