conan-io/conan

Pivoting on target-cpu/arch

Open

#847 ouverte le 9 janv. 2017

Voir sur GitHub
 (28 commentaires) (5 réactions) (1 assigné)Python (961 forks)batch import
Feedback please!complex: hugecomplex: mediumhelp wantedtype: feature

Métriques du dépôt

Stars
 (7 457 stars)
Métriques de merge PR
 (Merge moyen 15j 16h) (41 PRs mergées en 30 j)

Description

We have a couple common generations of CPU above the baseline x86_64 instruction - namely sandybridge and haswell, with AVX and AVX2/BMI/BMI2 respectively.

LLVM-backed languages and GGC 4.9+ all support "x86-64, sandybridge, haswell, native" for the -march/--target-cpu parameters. GCC 4.8 uses alternate identifiers corei7-avx and core-avx2 for those platforms.

These map nicely to MSVC /arch:AVX and /arch:AVX2, which is as granular as MSVC goes.

For now I'm using an extra field in .conan/settings.yml: target_cpu: [x86, x86-64, nehalem, sandybridge, haswell, native], but I need to move this down into the packages I consume as well, if I want to pivot on sandybridge/haswell support.

Has this come up before? Any convention to adopt?

Guide contributeur