This fixs the bug
https://llvm.org/bugs/show_bug.cgi?id=12587
Details
Diff Detail
Event Timeline
I have done arc commit --revision D<Revision> in my local svn repository and it seems to be successful, did I miss some thing?
If it does not get committed, please commit it for me, thanks.
Hm, I tried to add a test for this while committing it, and it doesn't pass for me. I think this needs more work.
I tried to add a test for this while committing it, and it doesn't pass for me. I think this needs more work. Your 'NoArgumentUnused' flag suppresses the warning message without actually passing -r to the linker.
What is your test case?
I followed the bug https://llvm.org/bugs/show_bug.cgi?id=12587
Before my change, the output of 'file all.o' is
all.o: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
After this change, the output is
all.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
So I think this patch is working.
I tried adding -r to clang/test/Driver/Xlinker-args.c, and it did not get passed through.
I uploaded a test case.
Without the patch, the test case fails, with the patch, the test case passes.
I tried adding this test case, and it did not pass on Windows. I will apply it and run it again.