blob: 771170c3e87091fbafd2be427548e803785f0cf2 [file] [log] [blame]
# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/linux/pkg_config.gni")
declare_args() {
# Controls whether the build should use the version of libffi library shipped
# with the system. By default, we only use the system version on Chrome OS:
# on Linux, libffi must be statically linked to prevent a situation where the
# runtime version of libffi is different from the build-time version from the
# sysroot.
use_system_libffi = default_toolchain == "//build/toolchain/cros:target"
}
if (use_system_libffi) {
pkg_config("libffi") {
packages = [ "libffi" ]
}
} else {
config("libffi") {
libs = [ ":libffi_pic.a" ]
}
}