llvm/llvm-project

[flang] Feature request: support for -Os/-Oz

Open

#62.268 geöffnet am 20. Apr. 2023

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C++ (10.782 Forks)batch import
enhancementflang:driverhelp wanted

Repository-Metriken

Stars
 (26.378 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 2h) (1.000 gemergte PRs in 30 T)

Beschreibung

flang-new version 17.0.0 (12426441ea2a9fdfcf6121a0061fa91d6112781d)

While building some SPEC CPU 2017 benchmarks, I noticed that Flang doesn't support -Os/-Oz.

Using a simple 'hello world' program:

$ ~/.local/llvm-install/bin/flang-new -Os hello.f90 -o hello
error: invalid integral value 's' in '-Os'
$ ~/.local/llvm-install/bin/flang-new -Oz hello.f90 -o hello
error: invalid integral value 'z' in '-Oz'

Is there a plan for adding support for code size optimization flags in the compiler?

Contributor Guide