(settings, arch)
| 882 | } |
| 883 | |
| 884 | function collectXcodeObjectFiles(settings, arch) { |
| 885 | const roots = [ |
| 886 | settings.OBJECT_FILE_DIR_normal, |
| 887 | settings.TARGET_TEMP_DIR, |
| 888 | settings.OBJECT_FILE_DIR, |
| 889 | ].filter(Boolean); |
| 890 | const files = new Set(); |
| 891 | for (const root of roots) { |
| 892 | if (fs.existsSync(root)) { |
| 893 | for (const file of walkFiles(root)) { |
| 894 | if (file.endsWith(".o") && objectFileMatchesArchPath(file, arch)) { |
| 895 | files.add(file); |
| 896 | } |
| 897 | } |
| 898 | } |
| 899 | } |
| 900 | const list = [...files].filter( |
| 901 | (file) => !file.includes("SimDeckPreviewPayload"), |
| 902 | ); |
| 903 | if (list.length === 0) { |
| 904 | console.warn( |
| 905 | "[simdeck-preview] warning: no Xcode object files found; compatibility will be limited.", |
| 906 | ); |
| 907 | } else { |
| 908 | console.log( |
| 909 | `[simdeck-preview] found ${list.length} Xcode object files for fallback linking`, |
| 910 | ); |
| 911 | } |
| 912 | return list; |
| 913 | } |
| 914 | |
| 915 | function objectFileMatchesArchPath(file, arch) { |
| 916 | const normalized = file.split(path.sep).join("/"); |
no test coverage detected