llvm/llvm-project

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

Open

#62,268 建立於 2023年4月20日

在 GitHub 查看
 (2 留言) (0 反應) (1 負責人)C++ (10,782 fork)batch import
enhancementflang:driverhelp wanted

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

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?

貢獻者指南