[PATCH] Fix "-mno-global-merge" option for clang

Bob Wilson bob.wilson at apple.com
Fri Jul 25 18:01:33 PDT 2014


> On Jul 25, 2014, at 5:46 PM, Bob Wilson <bob.wilson at apple.com> wrote:
> 
> 
>> On Jul 25, 2014, at 4:47 PM, Steven Wu <stevenwu at apple.com> wrote:
>> 
>> This patch fixes the problem in clang after llvm changes the option for global-merge in r210639. When using “-mno-global-merge”, clang will return following error currently:
>> clang: Unknown command line argument '-global-merge=false'.  Try: 'clang -help'
>> clang: Did you mean '-enable-global-merge=false’?
>> This patch should fix this problem.
>> 
>> I try to add a test case but it is not very obvious because there are no current examples for backend options. I add two tests in mno-global-merge.c to make sure it actually runs. If anyone has better idea how to handle this, please let me know.
>> 
>> I don’t have permission to commit the patch. Please help me to commit after review.
> 
> LGTM. I committed it for you in r213993.

Unfortunately that test doesn’t work so well. It requires an arm backend (which many of the buildbots do not build) and also writes output into the test directory. Since I don’t know of a better way to test a backend flag like that, I’ve just reverted the test in r213998.



More information about the cfe-commits mailing list