{"action":"created","issue":{"url":"https://api.github.com/repos/android-ndk/ndk/issues/75","repository_url":"https://api.github.com/repos/android-ndk/ndk","labels_url":"https://api.github.com/repos/android-ndk/ndk/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/android-ndk/ndk/issues/75/comments","events_url":"https://api.github.com/repos/android-ndk/ndk/issues/75/events","html_url":"https://github.com/android-ndk/ndk/issues/75","id":148312473,"number":75,"title":"Clang 3.8 from NDK r11c for Windows x86_64 can't correctly determine the linker's executable name","user":{"login":"dosvidos","id":1621289,"avatar_url":"https://avatars.githubusercontent.com/u/1621289?v=3","gravatar_id":"","url":"https://api.github.com/users/dosvidos","html_url":"https://github.com/dosvidos","followers_url":"https://api.github.com/users/dosvidos/followers","following_url":"https://api.github.com/users/dosvidos/following{/other_user}","gists_url":"https://api.github.com/users/dosvidos/gists{/gist_id}","starred_url":"https://api.github.com/users/dosvidos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dosvidos/subscriptions","organizations_url":"https://api.github.com/users/dosvidos/orgs","repos_url":"https://api.github.com/users/dosvidos/repos","events_url":"https://api.github.com/users/dosvidos/events{/privacy}","received_events_url":"https://api.github.com/users/dosvidos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-14T10:06:17Z","updated_at":"2016-04-14T15:31:41Z","closed_at":null,"body":"Our build system is using Clang not only as the compiler, but also as the front-end driver for a linker back-end. Unfortunately, Clang 3.8 from NDK r11c can't properly determine the linker executable:\r\n>android-ndk-r11c\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\clang++.exe Debug/main.o Debug/android_native_app_glue.o \r\n-gcc-toolchain android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64\r\n-target armv7-none-linux-androideabi\r\n-Wl,-soname,libAndroid5.so\r\n-shared\r\n--sysroot=android-ndk-r11c/platforms/android-9/arch-arm\r\n-Wl,-rpath-link=android-ndk-r11c/platforms/android-9/arch-arm/usr/lib \"-landroid\" \"-lEGL\" \"-lGLESv1_CM\"\r\n-fuse-ld=gold\r\n-Wl,--no-undefined\r\n-Wl,-z,noexecstack\r\n-Wl,-z,relro\r\n-Wl,-z,now\r\n-L\"android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/armv7-a\"\r\n-L\"android-ndk-r11c/platforms/android-9/arch-arm/usr/lib\"\r\n-L\"android-ndk-r11c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a\"\r\n-L\"android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9/armv7-a\"\r\n\"android-ndk-r11c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_static.a\"\r\n-lc\r\n-lm\r\n-llog\r\n-lgcc\r\n-olibAndroid5.so\r\n\r\nleads to an error `clang++.exe : error : invalid linker name in argument '-fuse-ld=gold'`\r\nSame story goes for `-fuse-ld=bfd`. If I append the `.exe` extension to the linker name the Clang is able to invoke the right executable and link the binary.\r\nThat's inconvenient, and it's the behavioral difference from Clang 3.5/6 shipped in NDK r10e.\r\n@DanAlbert has mentioned that your team has fixed this problem before - so this could be a regression.\r\n"},"comment":{"url":"https://api.github.com/repos/android-ndk/ndk/issues/comments/210004923","html_url":"https://github.com/android-ndk/ndk/issues/75#issuecomment-210004923","issue_url":"https://api.github.com/repos/android-ndk/ndk/issues/75","id":210004923,"user":{"login":"dosvidos","id":1621289,"avatar_url":"https://avatars.githubusercontent.com/u/1621289?v=3","gravatar_id":"","url":"https://api.github.com/users/dosvidos","html_url":"https://github.com/dosvidos","followers_url":"https://api.github.com/users/dosvidos/followers","following_url":"https://api.github.com/users/dosvidos/following{/other_user}","gists_url":"https://api.github.com/users/dosvidos/gists{/gist_id}","starred_url":"https://api.github.com/users/dosvidos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dosvidos/subscriptions","organizations_url":"https://api.github.com/users/dosvidos/orgs","repos_url":"https://api.github.com/users/dosvidos/repos","events_url":"https://api.github.com/users/dosvidos/events{/privacy}","received_events_url":"https://api.github.com/users/dosvidos/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T15:31:41Z","updated_at":"2016-04-14T15:31:41Z","body":"clang 3.8 from NDK r11c for Windows x86 does not accept both variants:\r\n`clang++.exe: error: invalid linker name in argument '-fuse-ld=gold'`\r\n`clang++.exe: error: invalid linker name in argument '-fuse-ld=gold.exe'`"}}