You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cmake --build ./build
[...]
[100%] Linking C executable main
clang: error: invalid linker name in argument '-fuse-ld=gold'
clang: error: invalid linker name in argument '-fuse-ld=gold'
make[2]: *** [CMakeFiles/main.dir/build.make:404: main] Error 1
make[1]: *** [CMakeFiles/Makefile2:1161: CMakeFiles/main.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
My AI slop report tells me this happens because the use of -fuse-ld=gold is guarded by a CMAKE_ANDROID_NDK_VERSION check inside CMake's own toolchain files (i.e., it performs an if <ndk_version> < 22 check before adding the flag). However, since neither AGP nor the NDK's CMake toolchain defines this variable, its value always evaluates to 0, so the flag is always added.
It also tells me this was fixed upstream in CMake 3.26, but since AGP still uses CMake 3.22 by default, this bug continues to affect everyone.
I am using a supported NDK
I have checked and the NDK I'm using is currently supported
Activity