diff --git a/src/Generator/Passes/GenerateSymbolsPass.cs b/src/Generator/Passes/GenerateSymbolsPass.cs index 9f4249f54..c41e8ec3a 100644 --- a/src/Generator/Passes/GenerateSymbolsPass.cs +++ b/src/Generator/Passes/GenerateSymbolsPass.cs @@ -369,7 +369,8 @@ private int RemainingCompilationTasks foreach (var module in Context.Options.Modules.Where(compiledLibraries.ContainsKey)) { CompiledLibrary compiledLibrary = compiledLibraries[module]; - CollectSymbols(compiledLibrary.OutputDir, compiledLibrary.Library); + TargetPlatform target = module.Defines.Contains("ANDROID") ? TargetPlatform.Android : Platform.Host; + CollectSymbols(target, compiledLibrary.OutputDir, compiledLibrary.Library); } var findSymbolsPass = Context.TranslationUnitPasses.FindPass(); findSymbolsPass.Wait = false; @@ -378,12 +379,12 @@ private int RemainingCompilationTasks } } - private void CollectSymbols(string outputDir, string library) + private void CollectSymbols(TargetPlatform target, string outputDir, string library) { using (var linkerOptions = new LinkerOptions(Context.LinkerOptions)) { linkerOptions.AddLibraryDirs(outputDir); - var output = GetOutputFile(TargetPlatform.Android, library); + var output = GetOutputFile(target, library); linkerOptions.AddLibraries(output); using (var parserResult = Parser.ClangParser.ParseLibrary(linkerOptions)) {