Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
ndk
Commits
fc215e50
Commit
fc215e50
authored
8 years ago
by
Treehugger Robot
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Download
Plain Diff
Merge "Don't manually set CMAKE_C_COMPILER_ID in toolchain file"
parents
198cbc9c
15909f20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
build/cmake/android.toolchain.cmake
build/cmake/android.toolchain.cmake
+9
-13
No files found.
build/cmake/android.toolchain.cmake
View file @
fc215e50
...
...
@@ -322,19 +322,6 @@ if(ANDROID_TOOLCHAIN STREQUAL clang)
set
(
ANDROID_C_COMPILER
"
${
ANDROID_LLVM_TOOLCHAIN_PREFIX
}
clang
${
ANDROID_TOOLCHAIN_SUFFIX
}
"
)
set
(
ANDROID_CXX_COMPILER
"
${
ANDROID_LLVM_TOOLCHAIN_PREFIX
}
clang++
${
ANDROID_TOOLCHAIN_SUFFIX
}
"
)
set
(
ANDROID_ASM_COMPILER
"
${
ANDROID_LLVM_TOOLCHAIN_PREFIX
}
clang
${
ANDROID_TOOLCHAIN_SUFFIX
}
"
)
# Clang can fail to compile if CMake doesn't correctly supply the target and
# external toolchain, but to do so, CMake needs to already know that the
# compiler is clang. Tell CMake that the compiler is really clang, but don't
# use CMakeForceCompiler, since we still want compile checks. We only want
# to skip the compiler ID detection step.
set
(
CMAKE_C_COMPILER_ID_RUN TRUE
)
set
(
CMAKE_CXX_COMPILER_ID_RUN TRUE
)
set
(
CMAKE_C_COMPILER_ID Clang
)
set
(
CMAKE_CXX_COMPILER_ID Clang
)
set
(
CMAKE_C_COMPILER_VERSION 3.8
)
set
(
CMAKE_CXX_COMPILER_VERSION 3.8
)
set
(
CMAKE_C_STANDARD_COMPUTED_DEFAULT 11
)
set
(
CMAKE_CXX_STANDARD_COMPUTED_DEFAULT 98
)
set
(
CMAKE_C_COMPILER_TARGET
${
ANDROID_LLVM_TRIPLE
}
)
set
(
CMAKE_CXX_COMPILER_TARGET
${
ANDROID_LLVM_TRIPLE
}
)
set
(
CMAKE_ASM_COMPILER_TARGET
${
ANDROID_LLVM_TRIPLE
}
)
...
...
@@ -576,6 +563,15 @@ set(CMAKE_AR "${ANDROID_AR}" CACHE FILEPATH "Archiver")
set
(
CMAKE_RANLIB
"
${
ANDROID_RANLIB
}
"
CACHE FILEPATH
"Ranlib"
)
set
(
_CMAKE_TOOLCHAIN_PREFIX
"
${
ANDROID_TOOLCHAIN_PREFIX
}
"
)
# Run the compiler ID checks before we set flags.
# When passed the `-march=` flag, Clang can fail to compile if CMake doesn't
# correctly supply the target and external toolchain, but to do so, CMake
# needs to already know that the compiler is Clang. Tell CMake to run the
# compiler ID detection step before we set Android flags.
# See https://gitlab.kitware.com/cmake/cmake/issues/16587
include
(
CMakeDetermineCCompiler
)
include
(
CMakeDetermineCXXCompiler
)
# Set or retrieve the cached flags.
# This is necessary in case the user sets/changes flags in subsequent
# configures. If we included the Android flags in here, they would get
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment