diff options
author | Scot Halverson <scothalverson@gmail.com> | 2021-12-13 11:06:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-13 10:06:57 -0800 |
commit | 28d31316b759d42b17fca769a7f190882335e55e (patch) | |
tree | dc6a98c159544c0414131ba6c73b3a22a8d6a613 | |
parent | f876813531d0fe5831e45d35d065c191140b6e99 (diff) | |
download | spack-28d31316b759d42b17fca769a7f190882335e55e.tar.gz spack-28d31316b759d42b17fca769a7f190882335e55e.tar.bz2 spack-28d31316b759d42b17fca769a7f190882335e55e.tar.xz spack-28d31316b759d42b17fca769a7f190882335e55e.zip |
CPU Architecture support (#27924)
* CPU Architecture Support
This commit removes the `native` variant in favor of Spack's built-in support for specifying a target cpu architecture. It also passes this information to the Legion build system so that it correctly passes the architecture to GASNet when built internally
* fixing whitespace
* Update package.py
based on a conversation with @streichler, this change sets `BUILD_MARCH` to an empty string, which will prevent legion's CMake build system from inserting `-march=native` and allow Spack to provide the correct architecture flags.
* Update package.py
adding a comment on what problem this MR solves.
* Update package.py
formatting
-rw-r--r-- | var/spack/repos/builtin/packages/legion/package.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py index 85373b53fb..fe13d19736 100644 --- a/var/spack/repos/builtin/packages/legion/package.py +++ b/var/spack/repos/builtin/packages/legion/package.py @@ -198,9 +198,6 @@ class Legion(CMakePackage): variant('max_fields', values=int, default=512, description="Maximum number of fields allowed in a logical region.") - variant('native', default=False, - description="Enable native/host processor optimizaton target.") - def cmake_args(self): spec = self.spec cmake_cxx_flags = [] @@ -339,10 +336,9 @@ class Legion(CMakePackage): maxfields = maxfields << 1 options.append('-DLegion_MAX_FIELDS=%d' % maxfields) - if '+native' in spec: - # default is off. - options.append('-DBUILD_MARCH:STRING=native') - + # This disables Legion's CMake build system's logic for targeting the native + # CPU architecture in favor of Spack-provided compiler flags + options.append('-DBUILD_MARCH:STRING=') return options @run_after('install') |