This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Don't override '-march' when using '-arch x86_64h'
ClosedPublic

Authored by thegameg on Dec 17 2018, 10:04 AM.

Details

Summary

On Darwin, using '-arch x86_64h' would always override the option passed through '-march'.

This patch allows users to use '-march' with x86_64h, while keeping the default to 'core-avx2'

Diff Detail

Repository
rL LLVM

Event Timeline

thegameg created this revision.Dec 17 2018, 10:04 AM

+ Akira, Quentin for their driver / x86_64h experience for a quick double check. Fwiw, LGTM.

arphaman accepted this revision.Dec 17 2018, 11:25 AM
arphaman added a subscriber: arphaman.

LGTM

This revision is now accepted and ready to land.Dec 17 2018, 11:25 AM
This revision was automatically updated to reflect the committed changes.

Should we emit an error if we request x86_64h with an arch older than haswell?

thegameg added a comment.EditedJan 7 2019, 7:12 AM

Should we emit an error if we request x86_64h with an arch older than haswell?

Makes sense. I'll put up a patch soon.

Edit: Patch here: https://reviews.llvm.org/D56394