From ecea41fd5cdb42cd429f867fae891e7eddb12541 Mon Sep 17 00:00:00 2001 From: Lewis Jordan Date: Tue, 12 Mar 2024 14:39:43 +0000 Subject: [PATCH] Added better handling of target platform --- src/Generator/Passes/GenerateSymbolsPass.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Generator/Passes/GenerateSymbolsPass.cs b/src/Generator/Passes/GenerateSymbolsPass.cs index c41e8ec3a..e17929a1e 100644 --- a/src/Generator/Passes/GenerateSymbolsPass.cs +++ b/src/Generator/Passes/GenerateSymbolsPass.cs @@ -369,7 +369,9 @@ private int RemainingCompilationTasks foreach (var module in Context.Options.Modules.Where(compiledLibraries.ContainsKey)) { CompiledLibrary compiledLibrary = compiledLibraries[module]; - TargetPlatform target = module.Defines.Contains("ANDROID") ? TargetPlatform.Android : Platform.Host; + TargetPlatform target = Context.ParserOptions.TargetTriple.StartsWith("aarch64") + ? TargetPlatform.Android + : Platform.Host; CollectSymbols(target, compiledLibrary.OutputDir, compiledLibrary.Library); } var findSymbolsPass = Context.TranslationUnitPasses.FindPass();