diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2019-02-03 15:53:46 -0500 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2019-02-03 16:16:01 -0500 |
commit | 4354a06c3eb2a2372221658b429814e4f1992e67 (patch) | |
tree | 09407ba5e5c4bbdaf4a96495af0d8fbf39051e61 /config/android.config | |
parent | e3bf7b225f11db3c28a9361d61c5cd0a2f05b77a (diff) |
Revert "android.config: Remove duplicate compiler flags"
This reverts commit 25f5d9f74f2abe9c1ad51ad74cf493af59217ea2.
The patch looks correct, but arguments passed to compiler through CC
env gets ignored by CMAKE. It was also mentionned by Matthew that some
other build system may do some checks without using the CFLAGS, which
would break the other way around. So the duplication is a
workaround for that.
Fixes #119
Diffstat (limited to 'config/android.config')
-rw-r--r-- | config/android.config | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/android.config b/config/android.config index 0bbdbbba..db95c7bb 100644 --- a/config/android.config +++ b/config/android.config @@ -131,7 +131,10 @@ ccache = use_ccache and 'ccache ' or '' defines = '-DANDROID -DPIC -D__ANDROID_API__=%s ' % (v) # -fno-integrated-as cause some libraries (e.g. pixman) fail to build with # clang's assembler -cflags = '-gcc-toolchain %s -isysroot %s -isystem %s -isystem %s/usr/include -isystem %s/usr/include/%s -fno-integrated-as -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fPIC -Wno-invalid-command-line-argument -Wno-unused-command-line-argument ' % (gcc_toolchain_root, isysroot, incl_dir, isysroot, isysroot, tools_prefix) +# -target is being duplicated here and in CC variable to workaround cmake +# ignoring arguments in CC while other build systems may ignore CFLAGS for +# certain checks. +cflags = '-target %s --sysroot %s -gcc-toolchain %s -isysroot %s -isystem %s -isystem %s/usr/include -isystem %s/usr/include/%s -fno-integrated-as -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fPIC -Wno-invalid-command-line-argument -Wno-unused-command-line-argument ' % (llvm_triple, sysroot, gcc_toolchain_root, isysroot, incl_dir, isysroot, isysroot, tools_prefix) # http://b.android.com/220159 http://b.android.com/222239 if target_arch == Architecture.X86: |