From 4363ba471ce9670b07f25ffcc3b2e45bea843d8b Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Tue, 16 Oct 2018 10:07:35 +0100 Subject: [PATCH] Reove use of GetShortPath --- src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs | 24 +++++++------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs b/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs index ee1af707ea9..eb68408e039 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/Aot.cs @@ -148,14 +148,6 @@ static string GetNdkToolchainLibraryDir(string binDir) return libPath; } - static string GetShortPath (string path) - { - if (Environment.OSVersion.Platform != PlatformID.Win32NT) - return QuoteFileName (path); - var shortPath = KernelEx.GetShortPathName (Path.GetDirectoryName (path)); - return Path.Combine (shortPath, Path.GetFileName (path)); - } - static string QuoteFileName(string fileName) { var builder = new CommandLineBuilder(); @@ -374,9 +366,9 @@ IEnumerable GetAotConfigs () Diagnostic.Error (5101, ex.Message); } var libs = new List() { - GetShortPath (Path.Combine(GetNdkToolchainLibraryDir(toolchainPath), "libgcc.a")), - GetShortPath (Path.Combine(androidLibPath, "libc.so")), - GetShortPath (Path.Combine(androidLibPath, "libm.so")) + Path.Combine(GetNdkToolchainLibraryDir(toolchainPath), "libgcc.a"), + Path.Combine(androidLibPath, "libc.so"), + Path.Combine(androidLibPath, "libm.so") }; ldFlags = string.Join(";", libs); } @@ -397,17 +389,17 @@ IEnumerable GetAotConfigs () if (!string.IsNullOrEmpty (AotAdditionalArguments)) aotOptions.Add (AotAdditionalArguments); if (sequencePointsMode == SequencePointsMode.Offline) - aotOptions.Add ("msym-dir=" + GetShortPath (outdir)); + aotOptions.Add ("msym-dir=" + QuoteFileName (outdir)); if (AotMode != AotMode.Normal) aotOptions.Add (AotMode.ToString ().ToLowerInvariant ()); - aotOptions.Add ("outfile=" + GetShortPath (outputFile)); + aotOptions.Add ("outfile=" + QuoteFileName (outputFile)); aotOptions.Add ("asmwriter"); aotOptions.Add ("mtriple=" + mtriple); - aotOptions.Add ("tool-prefix=" + GetShortPath (toolPrefix)); + aotOptions.Add ("tool-prefix=" + QuoteFileName (toolPrefix)); aotOptions.Add ("ld-flags=" + ldFlags); - aotOptions.Add ("llvm-path=" + GetShortPath (sdkBinDirectory)); - aotOptions.Add ("temp-path=" + GetShortPath (tempDir)); + aotOptions.Add ("llvm-path=" + QuoteFileName (sdkBinDirectory)); + aotOptions.Add ("temp-path=" + QuoteFileName (tempDir)); string aotOptionsStr = (EnableLLVM ? "--llvm " : "") + "--aot=" + string.Join (",", aotOptions);