File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,18 @@ export NM="${TOOLCHAIN}"/bin/llvm-nm
20
20
export OBJDUMP=" ${TOOLCHAIN} " /bin/llvm-objdump
21
21
export PKG_CONFIG_PATH=" ${INSTALL_PREFIX} /lib/pkgconfig"
22
22
23
+ # always generate debug info and build with optimizations
24
+ if [ ! -n " ${OPTFLAG+set} " ]; then
25
+ OPTFLAG=" -g -O2"
26
+ fi
27
+
23
28
# NOTE: The following compiler and linker flags mirror the NDK's CMake toolchain file
24
29
# and are recommended by the Android Build System Maintainers Guide (see link above)
25
30
26
31
# - emit stack guards to protect against security vulnerabilities caused by buffer overruns
27
32
# - enable FORTIFY to try to catch incorrect use of standard functions
28
33
# - generate position-independent code (PIC) to remove unsupported text relocations
29
- export CFLAGS=" -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIC"
34
+ export CFLAGS=" $OPTFLAG -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIC"
30
35
31
36
# -L library search path required for some projects to find libraries (e.g. gnustep-corebase)
32
37
# -fuse-ld=lld require to enforce LLD, which is needed e.g. for --no-rosegment flag
You can’t perform that action at this time.
0 commit comments