diff options
author | Sergey Kosukhin <skosukhin@gmail.com> | 2018-09-05 19:56:45 +0200 |
---|---|---|
committer | becker33 <becker33@llnl.gov> | 2018-09-05 10:56:45 -0700 |
commit | f9617b2ad8bbb12bbd3bda0d2cd8d1856e2c7fa8 (patch) | |
tree | 3d7ad872a140dbaf897491124dacf0dc3f83b88c /lib/spack/docs/basic_usage.rst | |
parent | 501669faba73d578fad745954f2deed8d653ebe2 (diff) | |
download | spack-f9617b2ad8bbb12bbd3bda0d2cd8d1856e2c7fa8.tar.gz spack-f9617b2ad8bbb12bbd3bda0d2cd8d1856e2c7fa8.tar.bz2 spack-f9617b2ad8bbb12bbd3bda0d2cd8d1856e2c7fa8.tar.xz spack-f9617b2ad8bbb12bbd3bda0d2cd8d1856e2c7fa8.zip |
Extended set of environment modification commands. (#8996)
Diffstat (limited to 'lib/spack/docs/basic_usage.rst')
-rw-r--r-- | lib/spack/docs/basic_usage.rst | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 622860b75f..d61ca699ad 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -684,11 +684,12 @@ Compiler environment variables and additional RPATHs In the exceptional case a compiler requires setting special environment variables, like an explicit library load path. These can bet set in an -extra section in the compiler configuration. The user can also specify -additional ``RPATHs`` that the compiler will add to all executables -generated by that compiler. This is useful for forcing certain compilers -to RPATH their own runtime libraries, so that executables will run -without the need to set ``LD_LIBRARY_PATH``. +extra section in the compiler configuration (the supported environment +modification commands are: ``set``, ``unset``, ``append-path``, and +``prepend-path``). The user can also specify additional ``RPATHs`` that the +compiler will add to all executables generated by that compiler. This is +useful for forcing certain compilers to RPATH their own runtime libraries, so +that executables will run without the need to set ``LD_LIBRARY_PATH``. .. code-block:: yaml @@ -701,12 +702,29 @@ without the need to set ``LD_LIBRARY_PATH``. f77: /opt/gcc/bin/gfortran fc: /opt/gcc/bin/gfortran environment: + unset: + BAD_VARIABLE: # The colon is required but the value must be empty set: - LD_LIBRARY_PATH : /opt/gcc/lib + GOOD_VARIABLE_NUM: 1 + GOOD_VARIABLE_STR: good + prepend-path: + PATH: /path/to/binutils + append-path: + LD_LIBRARY_PATH: /opt/gcc/lib extra_rpaths: - /path/to/some/compiler/runtime/directory - /path/to/some/other/compiler/runtime/directory + +.. note:: + + The section `environment` is interpreted as an ordered dictionary, which + means two things. First, environment modification are applied in the order + they are specified in the configuration file. Second, you cannot express + environment modifications that require mixing different commands, i.e. you + cannot `set` one variable, than `prepend-path` to another one, and than + again `set` a third one. + ^^^^^^^^^^^^^^^^^^^^^^^ Architecture specifiers ^^^^^^^^^^^^^^^^^^^^^^^ |