Commit ecd3598
authored
fix: use -fmodule-map-file for Swift metadata discovery in nsld.sh (#374)
Replace HEADER_SEARCH_PATHS-based module discovery with explicit
-fmodule-map-file= for the nsswiftsupport modulemap. The directory-based
discovery via -I was unreliable — the metadata generator's clang would
sometimes fail to find the modulemap, or during parallel multi-arch
builds, discover modulemaps from both architectures through the parent
internal/ directory (which is also in HEADER_SEARCH_PATHS), causing
"redefinition of module 'nsswiftsupport'" errors and potentially using a
stale bridging header from the wrong architecture.
This resulted in intermittent "ReferenceError: <class> is not defined"
errors for Swift plugin classes after npm install, requiring a full
platforms/ delete to recover.1 parent 90ac16c commit ecd3598
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments