CMake has -DNDEBUG and -O3 as its default flags for Release builds.
Homebrew clears out the default CMake flags, which is fine for
optimization because Homebrew passes its own optimization flag(s).
-DNDEBUG wasn't added back in, though.
This ensures -DNDEBUG is passed to CMake release builds by default,
instead of individual formulas having to add it explicitly.
This also removes explicit additions of -DNDEBUG from the formulae that
had them -- gflags, llvm, and taglib.
ClosesHomebrew/homebrew#47378.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
For users whose local brew is at around 2015-06-11 to 2015-08-06,
running `brew update` will emit following error:
Error: uninitialized constant Formulary::CoreFormulaRepository
This is caused by the same bug described in Homebrew/homebrew#42553.
This commit workarounds this issue and restores `brew update` compatibility
for users mentioned above.
Also cleanup legacy `require "cmd/tap"`.
Remove duplication, link to the API documentation more often,
tweak wording, add `@UniqMartin` as a maintainer, note `@jacknagel`'s
and `@adamv`'s significant past contributions to Homebrew, delete some
outdated or unneeded documentation, add some missing `Formula` API.
entries and simplify/improve `CONTRIBUTING.md`.
ClosesHomebrew/homebrew#46179.
ClosesHomebrew/homebrew#46618.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
There are plenty of IO operations inside Tap object, and it will be more
when implementing formula alias reverse look up(e.g. list all of alias
names for a formula). So let's cache them.
Some benchmark:
$ time brew info $(brew ruby -e 'puts Formula.tap_names') > /dev/null
Before: 6.40s user 2.42s system 96% cpu 9.134 total
After: 4.75s user 0.77s system 97% cpu 5.637 total
ClosesHomebrew/homebrew#44377.
Signed-off-by: Xu Cheng <xucheng@me.com>
The default is almost never useful. 15 seems like a good medium as it'll
not fill a 80x24 default but provides a bit more context. Also allow it
to be overriden for developers and `test-bot`.
Sometimes we accidentally install files outside prefix. After we fix that,
users will get nasty link conflict error. So we create a whitelist here to
allow overwriting certain files. e.g.
link_overwrite "bin/foo", "lib/bar"
link_overwrite "share/man/man1/baz-*"
During FormulaInstaller#link, the whitelist conflict files will be
backup into HOMEBREW_CACHE/Backup
add guard in Formula#file_modified? to prevent git popup
add guard in Superenv.bin before calling MacOS::Xcode.version
add guard against missing Xcode/CLT in Xcode.uncached_version
return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior
checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well
needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation
MacOS.can_build? becomes MacOS.has_apple_developer_tools?