From d7db26cf898294413775667525ab3093effb8c4f Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Wed, 27 Sep 2023 21:45:55 +0300 Subject: [PATCH 1/2] Detect latest versions of clang --- Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs b/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs index 2fabb2c46..44a2c247a 100644 --- a/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs +++ b/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs @@ -44,7 +44,7 @@ namespace Flax.Build.Platforms Compiler = Configuration.Compiler; else { - for (int ver = 15; ver >= 6; ver--) + for (int ver = 17; ver >= 6; ver--) { var compiler = "clang++-" + ver; if (Which(compiler) != null) From 8338d1cc37f604aa5270b5045402966f4400a379 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Wed, 27 Sep 2023 21:47:15 +0300 Subject: [PATCH 2/2] Fix `Which` not returning the found executable on success --- Source/Tools/Flax.Build/Platforms/Unix/UnixPlatform.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Tools/Flax.Build/Platforms/Unix/UnixPlatform.cs b/Source/Tools/Flax.Build/Platforms/Unix/UnixPlatform.cs index 9d9206f0f..b498f66e4 100644 --- a/Source/Tools/Flax.Build/Platforms/Unix/UnixPlatform.cs +++ b/Source/Tools/Flax.Build/Platforms/Unix/UnixPlatform.cs @@ -68,8 +68,11 @@ namespace Flax.Build.Platforms string path = proc.StandardOutput.ReadLine(); Log.Verbose(string.Format("which {0} exit code: {1}, result: {2}", name, proc.ExitCode, path)); - if (proc.ExitCode == 0 && string.IsNullOrEmpty(proc.StandardError.ReadToEnd())) + if (proc.ExitCode == 0) { + string err = proc.StandardError.ReadToEnd(); + if (!string.IsNullOrEmpty(err)) + Log.Verbose(string.Format("which stderr: {0}", err)); return path; }