Skip to content

Commit

Permalink
Fix for pants bootstrapping error caused by Wno-error=unused-command-…
Browse files Browse the repository at this point in the history
…line-argument-hard-error-in-future

Reviewed at https://rbcommons.com/s/twitter/r/562/
  • Loading branch information
Johan Oskarsson committed Jun 19, 2014
1 parent dccd515 commit 86a0fbe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 1 addition & 2 deletions build-support/bin/ci.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env bash

# Required on OS X.
export set ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future
source build-support/set_archflags.sh

function banner() {
echo
Expand Down
3 changes: 1 addition & 2 deletions build-support/pants_venv
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

# Required on OS X.
export set ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future
source build-support/set_archflags.sh

REPO_ROOT=$(cd $(dirname "${BASH_SOURCE[0]}") && cd "$(git rev-parse --show-toplevel)" && pwd)

Expand Down
12 changes: 12 additions & 0 deletions build-support/set_archflags.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# Prevent bootstrapping failure due to unrecognized flag:
# https://github.com/pantsbuild/pants/issues/78
function set_archflags() {
GCC_VERSION=`gcc -v 2>&1`
if [[ "$GCC_VERSION" == *503.0.38* ]]; then
# Required for clang version 503.0.38
export set ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future
fi
}
set_archflags

0 comments on commit 86a0fbe

Please sign in to comment.