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 |