Skip to content

make : support overriding CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS - #2886

Merged
ggerganov merged 5 commits into
ggml-org:masterfrom
cebtenzzre:overridable-cflags
Sep 3, 2023
Merged

ggerganov merged 5 commits into
ggml-org:masterfrom
cebtenzzre:overridable-cflags

Conversation

@cebtenzzre

Copy link
Copy Markdown
Collaborator

This PR implements something I've been wanting for a long time - the ability to override build flags via the command line when running make.

For example, one can now easily check for missing __attribute__((format(printf, ...))) attributes:

CFLAGS=-Wformat=2 CXXFLAGS=$CFLAGS make

Or make a release build with assertions enabled:

make CPPFLAGS='-UNDEBUG'

All without having to edit the Makefile.

Comment thread Makefile Resolved
@cebtenzzre

Copy link
Copy Markdown
Collaborator Author

Is this good to merge?

@ggerganov
ggerganov merged commit bc054af into ggml-org:master Sep 3, 2023
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
…2886)

* make : remove unused -DGGML_BIG_ENDIAN

* make : put preprocessor stuff in CPPFLAGS

* make : pass Raspberry Pi arch flags to g++ as well

* make : support overriding CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS

* make : fix inverted conditional
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
…2886)

* make : remove unused -DGGML_BIG_ENDIAN

* make : put preprocessor stuff in CPPFLAGS

* make : pass Raspberry Pi arch flags to g++ as well

* make : support overriding CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS

* make : fix inverted conditional
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
…2886)

* make : remove unused -DGGML_BIG_ENDIAN

* make : put preprocessor stuff in CPPFLAGS

* make : pass Raspberry Pi arch flags to g++ as well

* make : support overriding CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS

* make : fix inverted conditional
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
…2886)

* make : remove unused -DGGML_BIG_ENDIAN

* make : put preprocessor stuff in CPPFLAGS

* make : pass Raspberry Pi arch flags to g++ as well

* make : support overriding CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS

* make : fix inverted conditional
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
…2886)

* make : remove unused -DGGML_BIG_ENDIAN

* make : put preprocessor stuff in CPPFLAGS

* make : pass Raspberry Pi arch flags to g++ as well

* make : support overriding CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS

* make : fix inverted conditional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants