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>
This commit is contained in:
Simon Hausmann 2019-05-29 10:08:56 +02:00
parent bcca649440
commit c9c5ca9997

View File

@ -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}\".")