autofix-flag-cleaner
Removes unsupported or unknown compiler flags from build configurations.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Removes unsupported or unknown compiler flags from build configurations.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف 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 |