Experiment: optionally merge all impl files of a module into one

Aperta
#92 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c, cmake, cpp, python
Ambito
build-system

Direzione di ricerca

This is an experiment proposed for the fips CMake generation, not a defined change. Start with the cmake code in the fips repository that generates per-module targets, then check how source lists are passed to them. The issue asks for a global option that builds one unity source per module, with the result measured for compile time. Done would mean a working option plus measurements, but the design and the LTO and dead-code concerns are unresolved.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

planning

It's worth a try to generate a single source file per module which includes all .cc files during a cmake run, and only compile this single source file, and check how much this would reduce compilation time. This should be global cmake option. The advantage is that this would not require any changes to existing projects (neither their source file or cmake files), and that this would also automatically handle fips imports (e.g. complex librararies like turbobader, curl, glfw... could probably benefit greatly from this). The disadvantage is that the linker might pull in code which isn't used, so to use this for release builds, further dead code elimination would be necessary (e.g. LTO on clang, and on VStudio, each function should go into its own COMDAT via /Gy (https://msdn.microsoft.com/en-us/library/ms235601.aspx)), for debug builds this doesn't matter at all though.

Lingua principale
Python
Stelle
506
Fork
84
Merge medio
13h 14m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di floooh/fips

Tutte le issue di floooh/fips

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.