This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clang-format 2014-12-03 (new formula)
clang-format is a versatile source code formatter, part of the clang (and thus llvm) project. It can be used for C++, ObjC, Java, and JavaScript. The build is using cmake and ninja for speed; building all of llvm or using configure and make is very slow. clang-format is released in roughly monthly testing pushes, tracked by the subversion tags in "google/testing/yyyy-MM-dd". This formula uses tarballs from github that correspond to the resolved tags. Closes #35777. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
- Loading branch information
08e363c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[I'm working with Martin]
@MikeMcQuaid is there a particular reason -DCMAKE_BUILD_TYPE=None is in *std_cmake_args ?
When I build this formula with -DCMAKE_BUILD_TYPE=Release I get a 1.4MB binary, but the current formula produces a 3MB binary. I'd like to send a PR to change it, but want to understand if there is a reason for this comment:
"Setting it to Release would ignore our flags."
https://github.com/Homebrew/homebrew/blob/a70500f28fb4c2b2e9eba3a595dbe4241fc78239/Library/Homebrew/formula.rb#L469
thanks!
08e363c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to set our own e.g. CFLAGS and CMAKE_BUILD_TYPE=Release sets the flags to the CMake defaults.
08e363c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like that results in this (and probably other) binaries being larger than needed. I wonder if some are even compiled with debug instead of opt?
I'm no expert on C++ compilation, and I've built my own smaller clang-format for my own needs, so I'll just drop this thread.