Questions regarding linker options of gradle and cmake

60 views
Skip to first unread message

seal2002

unread,
Jul 14, 2020, 9:32:30 AM7/14/20
to android-ndk
Hello,
My project use gradle and cmake (the default option of Android Studio) to compile. I'm newbie on Cmake & gradle.
I want to pass --fix-cortex-a53-843419 to the linker step. So I have some question regarding how to pass the linker options to the config, and how to know the configs apply or don't
  1. For build.gradle, some arguments has description in here, so if I want to pass the fix cortex argument, seem no option for me to do it?
  2. Passing the option directly to CMakeLists.txt with CMAKE_SHARED_LINKER_FLAGS, It will effected all the architecture. And it will be error with armeabi-v7a, need to rewrite the CMakeLists.txt to avoid the issue? and the relate question in 4
  3. That is good with the compile_commands.json. However, it is very few of options. If need to check on the arguments has pass compile and link step, do we have another file?
  4. Regarding question 3,  I search in folder a\.cxx\cmake\[Type]\[abi]CmakeFiles\3.10.2\*.*. Found the file with name CMakeOutput.log and some interesting line arg [--fix-cortex-a53-843419] ==> ignore . So do you know actually with 2, the option already pass and accept?
Note that android-ndk-r21d is used. Host Machine is Ubuntu 18.04 - 64bit. Gradle 5.5.1 & AGP 3.5.3
Many thanks for your time to read those question.
Seal
.cxx.zip

Dan Albert

unread,
Jul 15, 2020, 3:47:30 PM7/15/20
to android-ndk

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/87c87a30-f823-42b3-b364-a0fdc302d3acn%40googlegroups.com.

Dan Albert

unread,
Jul 15, 2020, 3:49:14 PM7/15/20
to android-ndk

seal2002

unread,
Jul 16, 2020, 4:36:53 AM7/16/20
to android-ndk
Thanks Dan for clear answer and the link to llvm project. That would be great to check for other options too
Reply all
Reply to author
Forward
0 new messages