fhahn added a comment.

In D113779#3130744 <https://reviews.llvm.org/D113779#3130744>, @DavidSpickett 
wrote:

> There was a similar proposal for crypto https://reviews.llvm.org/D60472.
>
> Quoting @manojgupta for the pitch for that:
>
>> The motivation for this change is to make "crypto" setting an additive 
>> option e.g. like "-mavx" used in many media packages. Some packages in 
>> Chrome want to enable crypto conditionally for a few files to allow crypto 
>> feature to be used based on runtime cpu detection. They set 
>> "-march=armv8+crypto" flag but it gets overridden by the global 
>> "-march=armv8a" flag set by the build system in Chrome OS because the target 
>> cpu does not support crypto causing compile-time errors.
>> Ability to specify "-mcrypto" standalone makes it an additive option and 
>> ensures that it it is not lost. i.e. this will help in decoupling "-mcrypto" 
>> from "-march" so that they could be set independently. The current additive 
>> alternate is '-Xclang -target-feature -Xclang "+crypto" ' which is ugly.
>
> Concerns were raised there.
>
> Seems like we're balancing adding a bunch of (clang only for at least the 
> short term) options versus making the build system(s) cope with having to 
> track what the last `-march` was.

Thanks for sharing the related patch/discussion.

> versus making the build system(s) cope with having to track what the last 
> `-march` was.

Please see my earlier response. There can be use cases where the build system 
may not know what the last `-march` was, because the user may not have 
specified an explicit `-march` (e.g. they want to use the default picked by the 
compiler). Is there a way for the build system to conveniently determine what 
the default architecture version of the compiler is?

Also pushing this to the build system vendors means we need to convince X 
build-system vendors to adjust their implementations.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113779/new/

https://reviews.llvm.org/D113779

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to