autofix-flag-cleaner
Removes unsupported or unknown compiler flags from build configurations.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Removes unsupported or unknown compiler flags from build configurations.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
| 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 |
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.