BUILD.gn (775B)
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 5 import("//chromium/build/config/linux/pkg_config.gni") 6 7 declare_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 == "//chromium/build/toolchain/cros:target" 14 } 15 16 if (use_system_libffi) { 17 pkg_config("libffi") { 18 packages = [ "libffi" ] 19 } 20 } else { 21 config("libffi") { 22 libs = [ "ffi_pic" ] 23 } 24 }