Skip to main content

Tool to determine what GCC flags -march=native would resolve into

Project description

pre-commit Run the test suite

About

resolve-march-native is a small command line tool to resolve -march=native into explicit GCC or (experimental!) Clang flags.

Example

$ resolve-march-native --vertical
-march=sandybridge
-maes
--param=l1-cache-line-size=64
--param=l1-cache-size=32
--param=l2-cache-size=3072
$ resolve-march-native --clang --vertical
-march=sandybridge
-Xclang -target-feature -Xclang +64bit
-Xclang -target-feature -Xclang +aes
-Xclang -target-feature -Xclang +avx
-Xclang -target-feature -Xclang +cmov
-Xclang -target-feature -Xclang +crc32
-Xclang -target-feature -Xclang +cx16
-Xclang -target-feature -Xclang +cx8
-Xclang -target-feature -Xclang +fxsr
-Xclang -target-feature -Xclang +mmx
-Xclang -target-feature -Xclang +pclmul
-Xclang -target-feature -Xclang +popcnt
-Xclang -target-feature -Xclang +sahf
-Xclang -target-feature -Xclang +sse
-Xclang -target-feature -Xclang +sse2
-Xclang -target-feature -Xclang +sse3
-Xclang -target-feature -Xclang +sse4.1
-Xclang -target-feature -Xclang +sse4.2
-Xclang -target-feature -Xclang +ssse3
-Xclang -target-feature -Xclang +xsave
-Xclang -target-feature -Xclang +xsaveopt

Usage

$ COLUMNS=80 resolve-march-native --help
usage: resolve-march-native [-h] [--debug] [--clang [COMMAND] | --gcc
                            [COMMAND]] [--vertical] [--keep-minus-features]
                            [--keep-identical-mtune] [--keep-mno-flags]
                            [--add-recommended] [--version]

options:
  -h, --help            show this help message and exit
  --debug               enable debugging (default: disabled)
  --clang [COMMAND]     [EXPERIMENTAL] target Clang (default: target GCC) and
                        use given command if any (default: clang)
  --gcc [COMMAND]       target GCC explicitly and use given command if any
                        (default: gcc))
  --vertical            produce vertical output (default: horizontal output)
  --add-recommended, -a
                        add recommended flags (default: not added)
  --version             show program's version number and exit

Clang-related arguments:
  --keep-minus-features
                        keep "-target-feature -*" style parameters (default:
                        stripped away)

GCC-related arguments:
  --keep-identical-mtune
                        keep implied -mtune=... despite architecture identical
                        to -march=... (default: stripped away)
  --keep-mno-flags      keep -mno-* parameters (default: (superfluous ones)
                        stripped away)

Software libre licensed under GPL v2 or later.
Brought to you by Sebastian Pipping <sebastian@pipping.org>.

Please report bugs at https://github.com/hartwork/resolve-march-native/issues — thank you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resolve_march_native-6.0.1.tar.gz (63.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resolve_march_native-6.0.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file resolve_march_native-6.0.1.tar.gz.

File metadata

  • Download URL: resolve_march_native-6.0.1.tar.gz
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for resolve_march_native-6.0.1.tar.gz
Algorithm Hash digest
SHA256 8bf86da0c98eadb000f441bbfdeb013fec423b8450daceb9fb4ce3082c184de1
MD5 fc958007d2eff303cde58a9a7a338037
BLAKE2b-256 7771209c7066622c20ef5b0dce635ce86eb112738fb750cbe08831e99478658c

See more details on using hashes here.

File details

Details for the file resolve_march_native-6.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for resolve_march_native-6.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6174ce9b08eeecac63a919f0960ea044cb1d3926032e7ac0c7b752e253ddac65
MD5 c567774f941be25dd059f4e0c6b7b5dc
BLAKE2b-256 bc1b3e0f6b90d589f18769cde150aa72524cdd2f354714b5d2790f710d5f1752

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page