Set default link type to dynamic on cray. Includes hooks for platform-based environment changes
This commit is contained in:
		| @@ -190,6 +190,12 @@ def operating_system(self, name): | |||||||
|  |  | ||||||
|         return self.operating_sys.get(name, None) |         return self.operating_sys.get(name, None) | ||||||
|  |  | ||||||
|  |     @classmethod | ||||||
|  |     def setup_platform_environment(self, env): | ||||||
|  |         """ Subclass can override this method if it requires any | ||||||
|  |             platform-specific build environment modifications. | ||||||
|  |         """ | ||||||
|  |         pass | ||||||
|  |  | ||||||
|     @classmethod |     @classmethod | ||||||
|     def detect(self): |     def detect(self): | ||||||
|   | |||||||
| @@ -249,6 +249,11 @@ def set_build_environment_variables(pkg, env, dirty=False): | |||||||
|         if os.path.isdir(ci): |         if os.path.isdir(ci): | ||||||
|             env_paths.append(ci) |             env_paths.append(ci) | ||||||
|      |      | ||||||
|  | #    for item in pkg.spec.platform.env_paths: | ||||||
|  | #        env_paths.append(item) | ||||||
|  |         # TODO: move platform-specific knowledge to platform. | ||||||
|  |         # (join_path(spack.build_env_path, 'cray')) | ||||||
|  |  | ||||||
|     for item in reversed(env_paths): |     for item in reversed(env_paths): | ||||||
|         env.prepend_path('PATH', item) |         env.prepend_path('PATH', item) | ||||||
|     env.set_path(SPACK_ENV_PATH, env_paths) |     env.set_path(SPACK_ENV_PATH, env_paths) | ||||||
| @@ -444,6 +449,7 @@ def setup_package(pkg, dirty=False): | |||||||
|  |  | ||||||
|     set_compiler_environment_variables(pkg, spack_env) |     set_compiler_environment_variables(pkg, spack_env) | ||||||
|     set_build_environment_variables(pkg, spack_env, dirty) |     set_build_environment_variables(pkg, spack_env, dirty) | ||||||
|  |     pkg.spec.architecture.platform.setup_platform_environment(spack_env) | ||||||
|     load_external_modules(pkg) |     load_external_modules(pkg) | ||||||
|     # traverse in postorder so package can use vars from its dependencies |     # traverse in postorder so package can use vars from its dependencies | ||||||
|     spec = pkg.spec |     spec = pkg.spec | ||||||
|   | |||||||
| @@ -44,6 +44,13 @@ def __init__(self): | |||||||
|         self.add_operating_system(str(linux_dist), linux_dist) |         self.add_operating_system(str(linux_dist), linux_dist) | ||||||
|         self.add_operating_system('CNL10', Cnl()) |         self.add_operating_system('CNL10', Cnl()) | ||||||
|  |  | ||||||
|  |     @classmethod | ||||||
|  |     def setup_platform_environment(self, env): | ||||||
|  |         """ Change the linker to default dynamic to be more | ||||||
|  |             similar to linux/standard linker behavior | ||||||
|  |         """ | ||||||
|  |         env.set('CRAYPE_LINK_TYPE', 'dynamic') | ||||||
|  |  | ||||||
|     @classmethod |     @classmethod | ||||||
|     def detect(self): |     def detect(self): | ||||||
|         try: |         try: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Gregory Becker
					Gregory Becker