# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/config/sysroot.gni") import("//build/config/mac/mac_sdk.gni") config("sdk") { common_flags = [ "-isysroot", sysroot, "-mmacosx-version-min=$mac_deployment_target", ] cflags = common_flags ldflags = common_flags } # On Mac, this is used for everything except static libraries. config("mac_dynamic_flags") { ldflags = [] if (is_component_build) { ldflags += [ # Path for loading shared libraries for unbundled binaries. "-Wl,-rpath,@loader_path/.", # Path for loading shared libraries for bundled binaries. Get back from # Binary.app/Contents/MacOS. "-Wl,-rpath,@loader_path/../../..", ] } } # On Mac, this is used only for executables. config("mac_executable_flags") { # Remove this when targeting >=10.7 since it is the default in that config. ldflags = [ "-Wl,-pie" ] # Position independent. }