build/macosx/universal/mozconfig.common
author Mark Banner <bugzilla@standard8.plus.com>
Thu, 06 Sep 2012 08:22:52 +0200
changeset 13624 655ce139a246dc9fd785dae3017cb7c41c88c69b
parent 12191 1ad340ce909c84fc3d9d5d8cb250ec2c9b1dc093
child 14051 bd22a204044b1a6cfc63877f50fc0a5cdac75141
permissions -rw-r--r--
Port part of bug 738612 - Restore mozconfig-extra (Try) feature, or similar. r=bustage-fix to fix check-sync-dirs bustage

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

mk_add_options MOZ_UNIFY_BDATE=1

mk_add_options MOZ_POSTFLIGHT_ALL+=build/macosx/universal/flight.mk

# Note, the version (10) is used by libffi's configure.
ac_add_app_options i386 --target=i386-apple-darwin10
ac_add_app_options x86_64 --target=x86_64-apple-darwin10

ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk

. $topsrcdir/build/macosx/mozconfig.common

# $MOZ_BUILD_APP is only defined when sourced by configure.  That's not a
# problem, because the variables it affects only need to be set for
# configure.
if test -n "$MOZ_BUILD_APP" ; then
if test "$MOZ_BUILD_APP" = "i386" -o "$MOZ_BUILD_APP" = "x86_64"; then
  TARGET_CPU=$MOZ_BUILD_APP

  # $HOST_CXX is presently unused.  $HOST_CC will only be used during a cross
  # compile.
  HOST_CC=$CC
  HOST_CXX=$CXX

  NATIVE_CPU=`$topsrcdir/build/autoconf/config.guess | cut -f1 -d-`

  # It's not strictly necessary to specify -arch during native builds, but it
  # makes the merged about:buildconfig easier to follow, and it reduces
  # conditionalized differences between builds.
  CC="$CC -arch $TARGET_CPU"
  CXX="$CXX -arch $TARGET_CPU"

  # These must be set for cross builds, and don't hurt straight builds.
  RANLIB=ranlib
  AR=ar
  AS=$CC
  LD=ld
  STRIP="strip -x -S"

  # Let configure know that we mean business.
  if test "$NATIVE_CPU" != "$TARGET_CPU" ; then
    CROSS_COMPILE=1
  fi

  # Each per-CPU build should be entirely oblivious to the fact that a
  # universal binary will be produced.  The exception is packager.mk, which
  # needs to know to look for universal bits when building the .dmg.
  UNIVERSAL_BINARY=1

  export CC CXX HOST_CC HOST_CXX RANLIB AR AS LD STRIP
fi
fi