1# Copyright 2016 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//build/config/linux/pkg_config.gni") 6 7declare_args() { 8 # Controls whether the build should use the version of libffi library shipped 9 # with the system. By default, we only use the system version on Chrome OS: 10 # on Linux, libffi must be statically linked to prevent a situation where the 11 # runtime version of libffi is different from the build-time version from the 12 # sysroot. 13 use_system_libffi = default_toolchain == "//build/toolchain/cros:target" 14} 15 16if (use_system_libffi) { 17 pkg_config("libffi") { 18 packages = [ "libffi" ] 19 } 20} else { 21 config("libffi") { 22 libs = [ "ffi_pic" ] 23 } 24} 25