Displaying 20 results from an estimated 33 matches for "cmake_system_name".
2012 Dec 13
2
[LLVMdev] Cross compile LLVM
Hi;
I am trying to cross compile LLVM for Android-NDK;
I am using CMake as a build system; hence, i have defined CMAKE_SYSTEM_NAME
variable so to turn on CMAKE_CROSSCOMPILING flag, being used by LLVM.
As far as i understand from the LLVM structure; when cross compiling,
executable are generated with two versions; one goes under the target build
directory ${CMAKE_BINARY_DIR} and the other goes into
${CMAKE_BINARY_DIR}/native/....
2020 Sep 17
3
llvm cross compilation issue
I am trying to compile llvm using a toolchain file where I have
specified the target system and compilers as suggested at
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compilation-tool
chain:
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_C_COMPILER arm-unknown-linux-gnueabi-gcc)
set(CMAKE_CXX_COMPILER arm-unknown-linux-gnueabi-g++)
But the problem is that native tools like llvm-config, llvm-tblgen and
clang-tblgen, which must be built by the native compiler, are also
created by the...
2014 May 30
3
[LLVMdev] [PATCH] Use GCC_INSTALL_PREFIX for rpath if set.
...ATH "\$ORIGIN/../lib")
>> + if(DEFINED GCC_INSTALL_PREFIX)
>> + set(CMAKE_INSTALL_RPATH "${GCC_INSTALL_PREFIX}/lib")
>> + else()
>> + set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
>> + endif()
>> +
>> if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)
>> set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}
>> -Wl,-z,origin")
>> endif()
>>
> --
>> 1.9.1.423.g4596e3a
>>
>> _______________________________________________
>> LLVM Developers mailing list
>&...
2017 Aug 24
3
Building LLVM's fuzzers
...Do you know what's the analog of Wl,-dead_strip on Linux?
Apparently -Wl,—gc-sections.
For some reason LLVM does not do it for gold, even though it seems to support this flag as well.
(that could be another reason why you don’t see the failure on Linux)
1 if(NOT LLVM_NO_DEAD_STRIP)
2 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
3 # ld64's implementation of -dead_strip breaks tools that use plugins.
4 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
5 LINK_FLAGS " -Wl,-dead_strip")
6 elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
7...
2016 Feb 11
2
Guidance on cross compiling LLVM with mingw-w64 and cmake
The CrossCompile module is in a perpetual state of "when I get a chance...", and desperately needs some cleanup.
The problem you are hitting is caused by setting CMAKE_SYSTEM_NAME. When you set that CMake sets a variable CMAKE_CROSS_COMPILING. That variable should only be set when your host OS doesn't match your target OS. Since LLVM needs to build host-capable tools there is some goop to call out and configure a new CMake build directory to target the host.
-Chris
>...
2014 May 29
3
[LLVMdev] [PATCH] Use GCC_INSTALL_PREFIX for rpath if set.
...if(NOT DEFINED CMAKE_INSTALL_RPATH)
- set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
+ if(DEFINED GCC_INSTALL_PREFIX)
+ set(CMAKE_INSTALL_RPATH "${GCC_INSTALL_PREFIX}/lib")
+ else()
+ set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
+ endif()
+
if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,origin")
endif()
--
1.9.1.423.g4596e3a
2017 Aug 24
2
Building LLVM's fuzzers
...;> Apparently -Wl,—gc-sections.
>> For some reason LLVM does not do it for gold, even though it seems to
>> support this flag as well.
>> (that could be another reason why you don’t see the failure on Linux)
>>
>> 1 *if*(NOT LLVM_NO_DEAD_STRIP)
>> 2 *if*(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
>> 3 # ld64's implementation of -dead_strip breaks tools that use
>> plugins.
>> 4 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
>> 5 LINK_FLAGS " -Wl,-dead_strip")
>> 6 *elseif*(${CM...
2016 Feb 10
4
Guidance on cross compiling LLVM with mingw-w64 and cmake
...Fedora 23, also works fine on Ubuntu, Cygwin, etc).
I'm trying to recreate this with cmake so we don't get stuck on 3.8
indefinitely. Here's what I've got so far:
cmake .. -DCMAKE_C_COMPILER=/usr/bin/i686-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=/usr/bin/i686-w64-mingw32-g++ \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_RC_COMPILER=/usr/bin/i686-w64-mingw32-windres
# (some older versions of cmake have issues if you don't
# specify an absolute path to windres)
When this gets to "Configuring NATIVE targets" it calls cmake again
trying to use the same mingw compilers, but without CM...
2018 Feb 09
2
[cfe-dev] [Release-testers] [6.0.0 Release] Release Candidate 2 tagged
...of "cxxrt" on FreeBSD. I am going to try the following diff:
--- llvm.src/projects/libcxx/CMakeLists.txt
+++ llvm.src/projects/libcxx/CMakeLists.txt
@@ -135,6 +135,8 @@
elseif (APPLE)
set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
set(LIBCXX_CXX_ABI_SYSTEM 1)
+ elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+ set(LIBCXX_CXX_ABI_LIBNAME "libcxxrt")
else()
set(LIBCXX_CXX_ABI_LIBNAME "default")
endif()
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
S...
2014 Jun 13
2
[LLVMdev] LLVMgold.so in windows LLVM builds
I am trying to build LLVMgold.so on windows.
I came across this piece of code which includes gold source directory in
tools/CMakeLists.txt
if( LLVM_ENABLE_PIC )
# TODO: support other systems:
if( (CMAKE_SYSTEM_NAME STREQUAL "Linux")
OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") )
add_llvm_tool_subdirectory(gold)
else()
ignore_llvm_tool_subdirectory(gold)
endif()
else()
ignore_llvm_tool_subdirectory(gold)
endif()
This basically says, I cannot build LLVMgold.so on windows.
Any specific reasons...
2017 Aug 24
4
Building LLVM's fuzzers
...or some reason LLVM does not do it for gold, even though it seems to
>> >> support this flag as well.
>> >> (that could be another reason why you don’t see the failure on Linux)
>> >>
>> >> 1 *if*(NOT LLVM_NO_DEAD_STRIP)
>> >> 2 *if*(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
>> >> 3 # ld64's implementation of -dead_strip breaks tools that use
>> >> plugins.
>> >> 4 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
>> >> 5 LINK_FLAGS " -Wl,-dead_stri...
2018 Feb 11
2
[Openmp-dev] [cfe-dev] [Release-testers] [6.0.0 Release] Release Candidate 2 tagged
...diff:
>>
>> --- llvm.src/projects/libcxx/CMakeLists.txt
>> +++ llvm.src/projects/libcxx/CMakeLists.txt
>> @@ -135,6 +135,8 @@
>> elseif (APPLE)
>> set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
>> set(LIBCXX_CXX_ABI_SYSTEM 1)
>> + elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
>> + set(LIBCXX_CXX_ABI_LIBNAME "libcxxrt")
>> else()
>> set(LIBCXX_CXX_ABI_LIBNAME "default")
>> endif()
>
> ... and unfortunately that didn't work, since the CMakeFiles are unable to find the libcxxrt head...
2017 Aug 24
3
Building LLVM's fuzzers
...old, even though it seems to
>>>> >> support this flag as well.
>>>> >> (that could be another reason why you don’t see the failure on Linux)
>>>> >>
>>>> >> 1 *if*(NOT LLVM_NO_DEAD_STRIP)
>>>> >> 2 *if*(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
>>>> >> 3 # ld64's implementation of -dead_strip breaks tools that use
>>>> >> plugins.
>>>> >> 4 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
>>>> >> 5...
2017 Aug 25
2
Building LLVM's fuzzers
...> >> support this flag as well.
> >>>>> >> (that could be another reason why you don’t see the failure on
> Linux)
> >>>>> >>
> >>>>> >> 1 *if*(NOT LLVM_NO_DEAD_STRIP)
> >>>>> >> 2 *if*(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
> >>>>> >> 3 # ld64's implementation of -dead_strip breaks tools that
> use
> >>>>> >> plugins.
> >>>>> >> 4 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
> >>&...
2018 Feb 09
0
[Openmp-dev] [cfe-dev] [Release-testers] [6.0.0 Release] Release Candidate 2 tagged
...am going to try the following diff:
>
> --- llvm.src/projects/libcxx/CMakeLists.txt
> +++ llvm.src/projects/libcxx/CMakeLists.txt
> @@ -135,6 +135,8 @@
> elseif (APPLE)
> set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
> set(LIBCXX_CXX_ABI_SYSTEM 1)
> + elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
> + set(LIBCXX_CXX_ABI_LIBNAME "libcxxrt")
> else()
> set(LIBCXX_CXX_ABI_LIBNAME "default")
> endif()
... and unfortunately that didn't work, since the CMakeFiles are unable to find the libcxxrt headers:
CMake Warning at...
2018 Feb 12
0
[Openmp-dev] [cfe-dev] [Release-testers] [6.0.0 Release] Release Candidate 2 tagged
...; --- llvm.src/projects/libcxx/CMakeLists.txt
>>> +++ llvm.src/projects/libcxx/CMakeLists.txt
>>> @@ -135,6 +135,8 @@
>>> elseif (APPLE)
>>> set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
>>> set(LIBCXX_CXX_ABI_SYSTEM 1)
>>> + elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
>>> + set(LIBCXX_CXX_ABI_LIBNAME "libcxxrt")
>>> else()
>>> set(LIBCXX_CXX_ABI_LIBNAME "default")
>>> endif()
>>
>> ... and unfortunately that didn't work, since the CMakeFiles are unable to...
2016 May 03
4
Linux/ARM: Segfault issue when we build clang sources including __thread variable using -O2 flag
...s/clang-compiler-override.txt
@@ -1,13 +1,22 @@
SET (CMAKE_C_FLAGS_INIT "-Wall -std=c11")
SET (CMAKE_C_FLAGS_DEBUG_INIT "-g -O0")
SET (CLR_C_FLAGS_CHECKED_INIT "-g -O2")
-SET (CMAKE_C_FLAGS_RELEASE_INIT "-g -O3")
+if(CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l)
+ SET (CMAKE_C_FLAGS_RELEASE_INIT "-g0 -O1")
+else()
+ SET (CMAKE_C_FLAGS_RELEASE_INIT "-g0 -O3")
+ message(FATAL_ERROR "RELEASE... c flag no-arm")
+endif()
SET (CMAKE_C_FLAGS_RELWITHDEB...
2017 Sep 11
2
Building LLVM's fuzzers
...>>> >>>>> >> (that could be another reason why you don’t see the failure on
>>> Linux)
>>> >>>>> >>
>>> >>>>> >> 1 *if*(NOT LLVM_NO_DEAD_STRIP)
>>> >>>>> >> 2 *if*(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
>>> >>>>> >> 3 # ld64's implementation of -dead_strip breaks tools that
>>> use
>>> >>>>> >> plugins.
>>> >>>>> >> 4 set_property(TARGET ${target_name} APPEN...
2018 Feb 12
1
[Openmp-dev] [cfe-dev] [Release-testers] [6.0.0 Release] Release Candidate 2 tagged
...libcxx/CMakeLists.txt
>>>> +++ llvm.src/projects/libcxx/CMakeLists.txt
>>>> @@ -135,6 +135,8 @@
>>>> elseif (APPLE)
>>>> set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
>>>> set(LIBCXX_CXX_ABI_SYSTEM 1)
>>>> + elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
>>>> + set(LIBCXX_CXX_ABI_LIBNAME "libcxxrt")
>>>> else()
>>>> set(LIBCXX_CXX_ABI_LIBNAME "default")
>>>> endif()
>>>
>>> ... and unfortunately that didn't work, since the...
2020 Apr 10
2
Opus CMake build support for Apple frameworks
...ke/help/v3.14/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-or-watchos
Can you clarify what your patch does?
//Marcus
cmake-toolchains(7) — CMake 3.14.7 Documentation<https://cmake.org/cmake/help/v3.14/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-or-watchos>
The CMAKE_SYSTEM_NAME is the CMake-identifier of the target platform to build for.. The CMAKE_SYSTEM_PROCESSOR is the CMake-identifier of the target architecture to build for.. The CMAKE_SYSROOT is optional, and may be specified if a sysroot is available.. The CMAKE_STAGING_PREFIX is also optional. It may be used to spe...