Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7580ebc authored by Arman Uguray's avatar Arman Uguray
Browse files

gn-build: Add missing global compiler flags

This CL introduces compiler flags that enable stripping of unused symbols out of
static libraries at the linking stage. This is used by the Android build to keep
module dependencies small while building specialized executables (such as unit
tests).

Also added a preprocessor definition for the EXPORT_SYMBOL macro, recently
introduced by icoolidge@.

BUG=21339022

Change-Id: I7d3f9f64abc1f4e080196c18ccb893443ee1b64a
parent 82e8b98e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ config("linux") {
    "-Werror",
    "-g",
    "-O0",
    "-fpic",
    "-fdata-sections",
    "-ffunction-sections",
    "-fvisibility=hidden",
  ]

  cflags_c = [
@@ -50,6 +54,7 @@ config("linux") {
    "_GNU_SOURCE",
    "HAS_NO_BDROID_BUILDCFG",
    "LOG_NDEBUG=1",
    "EXPORT_SYMBOL=__attribute__((visibility(\"default\")))",

    # This is a macro to that can be used by source code to detect if the
    # current build is done by GN or via Android.mk. This is a temporary