conan-io/conan

Pivoting on target-cpu/arch

Open

#847 opened on 2017年1月9日

GitHub で見る
 (28 comments) (5 reactions) (1 assignee)Python (961 forks)batch import
Feedback please!complex: hugecomplex: mediumhelp wantedtype: feature

Repository metrics

Stars
 (7,457 stars)
PR merge metrics
 (平均マージ 15d 16h) (30d で 41 merged PRs)

説明

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?

コントリビューターガイド