This is an archive of the discontinued LLVM Phabricator instance.

libclc: Don't pass linker flags to CLC/LLAsm
ClosedPublic

Authored by daniels on Mar 31 2020, 12:30 PM.

Details

Summary

We don't want the regular linker flags for these invocations, since
we're not compiling to the target machine anyway. This fixes things like
'/machine:x64' being unknown when invoked under Windows.

Depends on: D77163

Diff Detail

Event Timeline

daniels created this revision.Mar 31 2020, 12:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2020, 12:30 PM

Have you tried clearing the target link flags using set_target_properties( ... LINK_FLAGS ... )?
I think having the ability to pass LINK_FLAGS here might be useful in the future.

Have you tried clearing the target link flags using set_target_properties( ... LINK_FLAGS ... )?
I think having the ability to pass LINK_FLAGS here might be useful in the future.

I tried, but the manual says that a) you must use STATIC_LIBRARY_FLAGS for static libraries, and b) you must use STATIC_LIBRARY_OPTIONS in preference to the former, as it sets rather than appends.

Nevertheless, neither of them actually worked for me, and both continued to pass the machine linker flags.

jvesely accepted this revision.Apr 6 2020, 7:11 PM

Have you tried clearing the target link flags using set_target_properties( ... LINK_FLAGS ... )?
I think having the ability to pass LINK_FLAGS here might be useful in the future.

I tried, but the manual says that a) you must use STATIC_LIBRARY_FLAGS for static libraries, and b) you must use STATIC_LIBRARY_OPTIONS in preference to the former, as it sets rather than appends.

Nevertheless, neither of them actually worked for me, and both continued to pass the machine linker flags.

oh well, it's not like we need any flags now. Thanks for checking.
LGTM.

This revision is now accepted and ready to land.Apr 6 2020, 7:11 PM
This revision was automatically updated to reflect the committed changes.