Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/cmd/build
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ if (ghout) {
///////////////////////////////////////////////////////////////////
function make_toolchain() {
const deps = new Set(config.deps.dry.build.concat(config.deps.dry.runtime).map(x => x.project))

if (deps.has('llvm.org') || deps.has('gnu.org/gcc')) {
return
}
Expand Down
8 changes: 8 additions & 0 deletions lib/porcelain/build-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const { usePantry, useConfig } = hooks
const { host } = utils

export default async function(config: Config, PATH?: Path): Promise<string> {
const depset = new Set(config.deps.gas.map(x => x.pkg.project))
const depstr = (deps: PackageRequirement[]) => deps.map(x => `"+${utils.pkg.str(x)}"`).join(' ')
const env_plus = `${depstr(config.deps.dry.runtime)} ${depstr(config.deps.dry.build)}`.trim()
const user_script = await usePantry().getScript(config.pkg, 'build', config.deps.gas, config)
Expand All @@ -24,6 +25,13 @@ export default async function(config: Config, PATH?: Path): Promise<string> {
const FLAGS = flags()
if (host().platform == 'darwin') {
FLAGS.push("export MACOSX_DEPLOYMENT_TARGET=11.0")

// gcc needs to use Apple’s ar/ranlib combo on darwin almost always or link failure occurs
// see https://github.com/pkgxdev/brewkit/pull/285
if (depset.has('gnu.org/binutils')) {
FLAGS.push("export AR=/usr/bin/ar")
FLAGS.push("export RANLIB=/usr/bin/ranlib")
}
}

const tmp = (() => {
Expand Down
1 change: 1 addition & 0 deletions projects/fix-machos.com/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ build:
else
ZLIB_VERSION={{deps.zlib.net.version}}
fi

- run: install_name_tool -change @rpath/zlib.net/v{{deps.zlib.net.version}}/lib/libz.${ZLIB_VERSION}.dylib {{prefix}}/lib/libz.dylib fix-machos-test
working-directory: '{{prefix}}/bin'

Expand Down