1# Copyright (c) 2013 The Chromium Authors. All rights reserved. 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/c++/c++.gni") 6 7group("linux") { 8 visibility = [ "//:optimize_gn_gen" ] 9} 10 11# This is included by reference in the //build/config/compiler config that 12# is applied to all targets. It is here to separate out the logic that is 13# Linux-only. 14config("compiler") { 15} 16 17# This is included by reference in the //build/config/compiler:runtime_library 18# config that is applied to all targets. It is here to separate out the logic 19# that is Linux-only. Please see that target for advice on what should go in 20# :runtime_library vs. :compiler. 21config("runtime_library") { 22 # Set here because OS_CHROMEOS cannot be autodetected in build_config.h like OS_LINUX and the like. 23 if (is_chromeos) { 24 defines = [ "OS_CHROMEOS" ] 25 } 26 libs = [] 27 if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") && 28 !use_custom_libcxx) { 29 libs += [ "atomic" ] 30 } 31 32 # double framework, use prebuilt libc++. 33 if (is_double_framework) { 34 if (current_cpu == "x86") { 35 libs += [ "${asdk_libs_dir}/ndk/libcxx/linux_x86/libc++.so" ] 36 } else { 37 libs += [ "${asdk_libs_dir}/ndk/libcxx/linux_x86_64/libc++.so" ] 38 } 39 } 40} 41 42config("executable_config") { 43 configs = [ "//build/config/security:executable_config" ] 44} 45 46config("x11") { 47 libs = [ 48 "X11", 49 "X11-xcb", 50 "xcb", 51 "Xcomposite", 52 "Xcursor", 53 "Xdamage", 54 "Xext", 55 "Xfixes", 56 "Xi", 57 "Xrender", 58 "Xtst", 59 ] 60} 61 62config("xcomposite") { 63 libs = [ "Xcomposite" ] 64} 65 66config("xext") { 67 libs = [ "Xext" ] 68} 69 70config("xrandr") { 71 libs = [ "Xrandr" ] 72} 73 74config("xscrnsaver") { 75 libs = [ "Xss" ] 76} 77 78config("xfixes") { 79 libs = [ "Xfixes" ] 80} 81 82config("libcap") { 83 libs = [ "cap" ] 84} 85 86config("xi") { 87 libs = [ "Xi" ] 88} 89 90config("xtst") { 91 libs = [ "Xtst" ] 92} 93 94config("libresolv") { 95 libs = [ "resolv" ] 96} 97 98# Ensures all exported symbols are added to the dynamic symbol table. This is 99# necessary to expose Chrome's custom operator new() and operator delete() (and 100# other memory-related symbols) to libraries. Otherwise, they might 101# (de)allocate memory on a different heap, which would spell trouble if pointers 102# to heap-allocated memory are passed over shared library boundaries. 103config("export_dynamic") { 104 ldflags = [ "-rdynamic" ] 105} 106