diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-07-16 23:19:02 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-08-05 13:13:15 -0400 |
commit | 6ec3cf288cdb90f04dea73bc841c090950ac090d (patch) | |
tree | 2da04e510f8363bb3b5a6c704edade21dfe8e645 | |
parent | a63719ef3bd221e63bd53f7ee56b1f07e28b5c69 (diff) | |
download | haskell-wip/T21874.tar.gz |
hadrian: Drop executable name resolution logicwip/T21874
Previously the Builder lookup logic would use `lookupInPath` on Windows
to resolve the tool name to an absolute path. However, as noted
in #21874, this is undesireable; if we need to normalise the tool name
then we should do so in the configure script.
-rwxr-xr-x | .gitlab/ci.sh | 1 | ||||
-rw-r--r-- | hadrian/src/Builder.hs | 13 |
2 files changed, 2 insertions, 12 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index 42c487bf0c..eab500e36b 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -143,6 +143,7 @@ function setup_locale() { } function mingw_init() { + toolchain="$(cygpath -w $toolchain)" case "$MSYSTEM" in MINGW32) target_triple="i386-unknown-mingw32" diff --git a/hadrian/src/Builder.hs b/hadrian/src/Builder.hs index f3c6f80d41..404da6562f 100644 --- a/hadrian/src/Builder.hs +++ b/hadrian/src/Builder.hs @@ -451,18 +451,7 @@ systemBuilderPath builder = case builder of unless (isOptional builder) . error $ "Non optional builder " ++ quote key ++ " is not specified" ++ inCfg return "" -- TODO: Use a safe interface. - else do - -- angerman: I find this lookupInPath rather questionable. - -- if we specify CC, LD, ... *without* a path, that is intentional - -- lookupInPath should be done by the person invoking the configure - -- script iif they want to have that full path, if they just want - -- some generic tool name (on purpose!) the build system should not - -- go behind their backs to add a path they likely never wanted. - fullPath <- lookupInPath path - case (windowsHost, hasExtension fullPath) of - (False, _ ) -> return path - (True , True ) -> fixAbsolutePathOnWindows fullPath - (True , False) -> fixAbsolutePathOnWindows fullPath <&> (<.> exe) + else return path -- Without this function, on Windows we can observe a bad builder path -- for 'autoreconf'. If the relevant system.config field is set to |