mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-28 13:30:29 +00:00
Fix -Xaarch64 in cosmocc
It's now possible to pass flags like -Xaarch64-march=armv8.2-a+dotprod so that cosmocc will use newer ARM ISAs. For AMD64 there's another one worth mentioning, which looks like this: -Xx86_64-mssse3
This commit is contained in:
parent
3864f78b88
commit
873069fcd7
3 changed files with 93 additions and 1 deletions
|
@ -134,6 +134,13 @@ kinds of codebases using `cosmocc` which is just a convenient wrapper
|
|||
around the cross compilers, which would be a better choice to use in
|
||||
this type of circumstance.
|
||||
|
||||
## Usage
|
||||
|
||||
By default, all the code you compile will use the baseline of the X86_64
|
||||
and AARCH64, which is K8 and ARMv8.0. You can pass architecture specific
|
||||
flags to use newer ISAs by using the `-Xx86_64` and `-Xaarch64` prefixes
|
||||
like `-Xx86_64-mssse3` and `-Xaarch64-march=armv8.2-a+dotprod`.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Your `cosmocc` compiler runs a number commands under the hood. If
|
||||
|
|
|
@ -185,7 +185,7 @@ for x; do
|
|||
continue
|
||||
elif [ x"$x" != x"${x#-Xaarch64}" ]; then
|
||||
x=${x#-Xaarch64}
|
||||
FLAGS_aarch64="$FLAGS_aarch64 $x"
|
||||
FLAGS_AARCH64="$FLAGS_AARCH64 $x"
|
||||
continue
|
||||
elif [ x"$x" = x"-dumpversion" ]; then
|
||||
echo $GCC_VERSION
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue