autofix-flag-cleaner
Removes unsupported or unknown compiler flags from build configurations.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Removes unsupported or unknown compiler flags from build configurations.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Comprehensive build error repair tool for C++, Rust, and Java projects using Soong, GN, Make, or CMake. Automatically fixes 30+ types of errors including headers, linking, APIs, and config.
Fixes function call errors with wrong number or type of arguments.
Fixes type mismatch errors by adding appropriate casts or conversions.
Fixes syntax errors in Android.bp files.
Fixes scope and variable errors in BUILD.gn files.
Fixes script permission errors by making files executable.
| name | autofix-flag-cleaner |
| description | Removes unsupported or unknown compiler flags from build configurations. |
Fixes build errors caused by compiler flags that are not supported by the current toolchain.
unknown argument: '-fX'unsupported option '-fX'unknown warning option '-Wno-X'unrecognized command line optionFrom error: clang: error: unknown argument: '-fno-strict-overflow'
Flag: -fno-strict-overflow
Search for the flag in build files:
grep -r "fno-strict-overflow" --include="*.bp" --include="*.gn" --include="CMakeLists.txt"
In Android.bp:
// Before
cflags: ["-Wall", "-fno-strict-overflow", "-O2"],
// After
cflags: ["-Wall", "-O2"],
In BUILD.gn:
// Before
cflags = [ "-Wall", "-fno-strict-overflow" ]
// After
cflags = [ "-Wall" ]
In CMakeLists.txt:
# Before
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-overflow")
# After
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
| Flag | Issue |
|---|---|
-fno-strict-overflow | GCC-only, not in Clang |
-Wno-unused-but-set-* | GCC-only warning |
-fstack-protector-strong | Older toolchains |