6
6
# on Windows platform.
7
7
#
8
8
# NOTE: the build requires a development ARM Linux root filesystem to use
9
- # proper target platform depended library and header files.
9
+ # proper target platform depended library and header files:
10
+ # - create <full-path-to-clang-configs> directory and put the clang configuration
11
+ # file named <TOOLCHAIN_TARGET_TRIPLE>.cfg into it.
12
+ # - add the `--sysroot=<path-to-develop-arm-linux-root-fs>` argument into
13
+ # this configuration file.
14
+ # - add other necessary target depended clang arguments there,
15
+ # such as '-mcpu=cortex-a78' & etc.
16
+ #
17
+ # See more details here: https://clang.llvm.org/docs/UsersManual.html#configuration-files
10
18
#
11
19
# Configure:
12
20
# cmake -G Ninja ^
13
- # -DTOOLCHAIN_TARGET_TRIPLE=armv7 -unknown-linux-gnueabihf ^
21
+ # -DTOOLCHAIN_TARGET_TRIPLE=aarch64 -unknown-linux-gnu ^
14
22
# -DCMAKE_INSTALL_PREFIX=../install ^
15
- # -DDEFAULT_SYSROOT=<path-to-develop-arm-linux-root-fs> ^
16
- # -DLLVM_AR=<llvm_obj_root>/bin/llvm-ar[.exe] ^
23
+ # -DCLANG_CONFIG_FILE_USER_DIR=<full-path-to-clang-configs> ^
17
24
# -DCMAKE_CXX_FLAGS="-D__OPTIMIZE__" ^
18
25
# -DREMOTE_TEST_HOST="<hostname>" ^
19
26
# -DREMOTE_TEST_USER="<ssh_user_name>" ^
@@ -43,10 +50,6 @@ get_filename_component(LLVM_PROJECT_DIR
43
50
"${CMAKE_CURRENT_LIST_DIR} /../../../"
44
51
ABSOLUTE )
45
52
46
- if (NOT DEFINED DEFAULT_SYSROOT )
47
- message (WARNING "DEFAULT_SYSROOT must be specified for the cross toolchain build." )
48
- endif ()
49
-
50
53
if (NOT DEFINED LLVM_ENABLE_ASSERTIONS )
51
54
set (LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "" )
52
55
endif ()
@@ -136,7 +139,6 @@ endif()
136
139
set (LLVM_BUILTIN_TARGETS "${TOOLCHAIN_TARGET_TRIPLE} " CACHE STRING "" )
137
140
138
141
set (BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSTEM_NAME "Linux" CACHE STRING "" )
139
- set (BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSROOT "${DEFAULT_SYSROOT} " CACHE STRING "" )
140
142
set (BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_INSTALL_RPATH "${RUNTIMES_INSTALL_RPATH} " CACHE STRING "" )
141
143
set (BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "" )
142
144
set (BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_LLVM_CMAKE_DIR "${LLVM_PROJECT_DIR} /llvm/cmake/modules" CACHE PATH "" )
@@ -156,7 +158,6 @@ set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "")
156
158
set (RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LLVM_ENABLE_RUNTIMES "${LLVM_ENABLE_RUNTIMES} " CACHE STRING "" )
157
159
158
160
set (RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSTEM_NAME "Linux" CACHE STRING "" )
159
- set (RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSROOT "${DEFAULT_SYSROOT} " CACHE STRING "" )
160
161
set (RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_INSTALL_RPATH "${RUNTIMES_INSTALL_RPATH} " CACHE STRING "" )
161
162
set (RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "" )
162
163
0 commit comments