Back to list
hyz0906

autofix-flag-cleaner

by hyz0906

0🍴 0📅 Jan 19, 2026

SKILL.md


name: autofix-flag-cleaner description: Removes unsupported or unknown compiler flags from build configurations.

Flag Cleaner Skill

Fixes build errors caused by compiler flags that are not supported by the current toolchain.

Detection Patterns

  • unknown argument: '-fX'
  • unsupported option '-fX'
  • unknown warning option '-Wno-X'
  • unrecognized command line option

Strategy

  1. Extract Flag: Parse the unsupported flag from the error.
  2. Locate Build File: Find where the flag is defined.
  3. Remove Flag: Delete the flag from the build configuration.

Instructions

Step 1: Identify the Flag

From error: clang: error: unknown argument: '-fno-strict-overflow' Flag: -fno-strict-overflow

Step 2: Find the Build File

Search for the flag in build files:

grep -r "fno-strict-overflow" --include="*.bp" --include="*.gn" --include="CMakeLists.txt"

Step 3: Remove the Flag

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}")

Common Problematic Flags

FlagIssue
-fno-strict-overflowGCC-only, not in Clang
-Wno-unused-but-set-*GCC-only warning
-fstack-protector-strongOlder toolchains

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon