1
0
Fork
You've already forked cflags
0
[WIP] Organize a long list of compiler options into something more human-readable
  • Python 59.2%
  • Nix 40.8%
2026年06月12日 16:15:55 +02:00
nix PoC 2026年04月24日 21:19:23 +02:00
samples add some sample invocations 2026年04月27日 12:01:00 +02:00
src/cflags allow taking options on the cmdline for double convenience 2026年06月12日 16:15:55 +02:00
.editorconfig init 2026年04月24日 13:17:39 +02:00
.gitignore init 2026年04月24日 13:17:39 +02:00
default.nix PoC 2026年04月24日 21:19:23 +02:00
flake.lock PoC 2026年04月24日 21:19:23 +02:00
flake.nix re-init 2026年04月24日 13:18:10 +02:00
package.nix devshell: add src/ to PYTHONPATH 2026年04月25日 13:58:55 +02:00
pyproject.toml reörganize 2026年04月25日 14:41:47 +02:00
README.md add readme 2026年04月25日 14:43:30 +02:00
shell.nix re-init 2026年04月24日 13:18:10 +02:00

cflags [WIP]

Turn invocations like this:

$ clang++ -Itests/unit/liblixutil-tests.p -Itests/unit -I../tests/unit -I. -I.. -I../tests/unit/libutil-support -Ilix -fdiagnostics-color=always -fpch-instantiate-templates -include-pch tests/unit/liblixutil-tests.p/precompiled-headers.hh.pch -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++23 -O2 -g -DLIX_UR_COMPILER_UWU -fpch-instantiate-templates -include lix/config.h -Wno-unused-parameter -Wno-deprecated-declarations -Wno-missing-field-initializers -Wimplicit-fallthrough -Werror=switch -Werror=switch-enum -Werror=unused-result -Wdeprecated-copy -Wignored-qualifiers -Werror=suggest-override -Werror=embedded-directive -DJSON_DISABLE_ENUM_SERIALIZATION=1 -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error -ffile-prefix-map=../lix=lix -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -pthread -isystem/nix/store/qk4pr5iy3nzgghpya6lv0b6z42b2vs59-libcpuid-0.8.1/include/libcpuid -DBOOST_ALL_NO_LIB -DGTEST_HAS_PTHREAD=1 -MD -MQ tests/unit/liblixutil-tests.p/libutil_hilite.cc.o -MF tests/unit/liblixutil-tests.p/libutil_hilite.cc.o.d -o tests/unit/liblixutil-tests.p/libutil_hilite.cc.o -c ../tests/unit/libutil/hilite.cc

Into this:

-D
 _FILE_OFFSET_BITS=64
 LIX_UR_COMPILER_UWU
 JSON_DISABLE_ENUM_SERIALIZATION=1
 _DEFAULT_SOURCE
 _XOPEN_SOURCE=600
 BOOST_ALL_NO_LIB
 GTEST_HAS_PTHREAD=1
-I tests/unit/liblixutil-tests.p tests/unit ../tests/unit . .. ../tests/unit/libutil-support lix
-O 2
-W all invalid-pch extra implicit-fallthrough deprecated-copy ignored-qualifiers
-Werror switch switch-enum unused-result suggest-override embedded-directive
-Wno unused-parameter deprecated-declarations missing-field-initializers
-f
 diagnostics-color=always
 pch-instantiate-templates
 pch-instantiate-templates
 sanitize=signed-integer-overflow
 sanitize-undefined-trap-on-error
 file-prefix-map=../lix=lix
-include lix/config.h
-include-pch tests/unit/liblixutil-tests.p/precompiled-headers.hh.pch
-isystem /nix/store/qk4pr5iy3nzgghpya6lv0b6z42b2vs59-libcpuid-0.8.1/include/libcpuid
-o tests/unit/liblixutil-tests.p/libutil_hilite.cc.o
-std c++23
Other:
 clang++
 -g
 -pthread
 -MD
 -MQ
 tests/unit/liblixutil-tests.p/libutil_hilite.cc.o
 -MF
 tests/unit/liblixutil-tests.p/libutil_hilite.cc.o.d
 -c
 ../tests/unit/libutil/hilite.cc