emscripten-core / emscripten-core/emscripten
Provide STRIP for autotools
- Lingua principale
- C++
- Stelle
- 27.6k
- Fork
- 3.6k
- Merge medio
- 1g 14h
- PR unite (30g)
- 125
Descrizione
Autotools use `STRIP` variable (https://github.com/autotools-mirror/automake/blob/80714ea0aba62f025780f432abfbab2e66f6f801/m4/strip.m4#L25) which allows to correctly strip binaries when cross-compiling instead of attempting to run regular `strip` on incompatible binaries.
I thought I could relatively easily add this here https://github.com/emscripten-core/emscripten/blob/7d7dbdef08c6a418d5256b89edc2b7be030b0b80/tools/building.py#L70, pointing to `llvm-strip` or `emstrip`, but the problem is that it will be invoked by autotools on executables themselves, which in our case will usually happen to be a JS file.
I wonder if it would make sense to modify `emstrip` (https://github.com/emscripten-core/emscripten/blob/0c21eb984593d4bf606f0e7fa6c396059ccf4860/emstrip.py#L7) to automatically find `.wasm` file if the provided one looks like `.js`, so that it correctly handles both standalone Wasm and JS+Wasm cases? Then we would be able to provide such `emstrip` wrapper as `STRIP` executable.
cc @sbc100
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da tools/building.py intorno alla riga 70 e da emstrip.py intorno alla riga 7, quindi confronta il comportamento di Automake strip.m4 a cui si fa riferimento. Traccia il modo in cui autotools passa i percorsi degli eseguibili e determina la gestione prevista per gli input Wasm standalone e JS+Wasm; il lavoro è completato quando un percorso STRIP supportato funziona per entrambi senza tentare di eseguire strip normale su binari incompatibili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, wasm
- Ambito
- build-system, compilers
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100