summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-05-29 10:08:56 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-05-29 13:28:35 +0000
commitc9c5ca99973e5145f8ecd3759fa00994e41a4904 (patch)
treecc147d65ced7a32f6b54782cbf54e59021ea4eb1 /cmake
parentbcca64944052618b8aa8e3f9be82eb5ccad5807e (diff)
Fix linker flag detection on Android
Since LINUX is not set when targeting Android, we must extend these conditions manually. Change-Id: Ie78167d452e0806bfa64773c1e311a99f4a28f8c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuild.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 41e33f3857..8b0dfa5c7a 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -441,7 +441,7 @@ function(qt_internal_add_link_flags_no_undefined target)
if (GCC OR CLANG)
if(APPLE)
set(no_undefined_flag "-Wl,-undefined,error")
- elseif(LINUX OR MINGW)
+ elseif(LINUX OR MINGW OR ANDROID)
set(no_undefined_flag "-Wl,--no-undefined")
else()
message(FATAL_ERROR "Platform linker doesn't support erroring upon encountering undefined symbols. Target:\"${target}\".")
@@ -460,7 +460,7 @@ function(qt_internal_add_link_flags_gc_sections target visibility)
if (GCC OR CLANG)
if(APPLE)
set(gc_sections_flag "-Wl,-dead_strip")
- elseif(LINUX OR BSD OR SOLARIS OR WIN32)
+ elseif(LINUX OR BSD OR SOLARIS OR WIN32 OR ANDROID)
set(gc_sections_flag "-Wl,--gc-sections")
else()
message(FATAL_ERROR "Platform linker doesn't support gc sections. Target:\"${target}\".")