diff options
author | John W. Parent <45471568+johnwparent@users.noreply.github.com> | 2023-09-21 13:42:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-21 10:42:12 -0700 |
commit | aeaca776302924d00fe52cbda20d27963ae8bca7 (patch) | |
tree | 49d3cdc9281ccf09d599b04c10b47f3ca8baf122 /.dockerignore | |
parent | 2a9d1d444b7a8705a32810458c69263f251f791d (diff) | |
download | spack-aeaca776302924d00fe52cbda20d27963ae8bca7.tar.gz spack-aeaca776302924d00fe52cbda20d27963ae8bca7.tar.bz2 spack-aeaca776302924d00fe52cbda20d27963ae8bca7.tar.xz spack-aeaca776302924d00fe52cbda20d27963ae8bca7.zip |
Harden compiler detection against errors (#39736)
Fixes #39622
Add a timeout to compiler detection and allow Spack to proceed when
this timeout occurs.
In all cases, the timeout is 120 seconds: it is assumed any compiler
invocation we do for the purposes of verifying it would resolve in
that amount of time.
Also refine executables that are tested as being possible MSVC
instances, and limit where we try to detect MSVC. In more detail:
* Compiler detection should timeout after a certain period of time.
Because compiler detection executes arbitrary executables on the
system, we could encounter a program that just hangs, or even a
compiler that hangs on a license key or similar. A timeout
prevents this from hanging Spack.
* Prevents things like cl-.* from being detected as potential MSVC
installs. cl is always just cl in all cases that Spack supports.
Change the MSVC class to indicate this.
* Prevent compilers unsupported on certain platforms from being
detected there (i.e. don't look for MSVC on systems other than
Windows).
The first point alone is sufficient to address #39622, but the
next two reduce the likelihood of timeouts (which is useful since
those slow down the user even if they are survivable).
Diffstat (limited to '.dockerignore')
0 files changed, 0 insertions, 0 deletions