@@ -37,7 +37,8 @@ import System.IO.Error
3737
3838#ifdef FREESTANDING
3939import Tools_idris
40−import System.FilePath (isAbsolute, dropFileName)
40+import Data.List (intercalate)
41+import System.FilePath (isAbsolute, dropFileName, searchPathSeparator)
4142import System.Directory (doesDirectoryExist)
4243import System.Environment (getEnv, setEnv, getExecutablePath)
4344#endif
@@ -109,11 +110,10 @@ setupBundledCC = when hasBundledToolchain
109110 if absolute
110111 then tcDir
111112 else dropFileName exePath ++ tcDir
112− let pathSep = if isWindows then ";" else ":"
113113 present <- doesDirectoryExist target
114− when present
115− $ do newPath <- return $ target ++ pathSep ++ path
116− setEnv "PATH" newPath
114+ when present $ do
115+ newPath <- return $ intercalate [searchPathSeparator] [target, path]
116+ setEnv "PATH" newPath
117117#else
118118setupBundledCC = return ()
119119#endif