Bug 1869647 - Mark hasStorageAccess.sub.https.window.html as intermittent after wpt...
[gecko.git] / widget / gtk / mozgtk / moz.build
blobd5e78d00323bc79f3f533bbad6e77dc5ffa7103f
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 SharedLibrary("mozgtk")
9 SOURCES += [
10     "mozgtk.c",
13 CFLAGS += CONFIG["MOZ_X11_CFLAGS"]
14 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
16 # If LDFLAGS contains -Wl,--as-needed or if it's the default for the toolchain,
17 # we need to add -Wl,--no-as-needed before the gtk libraries, otherwise the
18 # linker will drop those dependencies because no symbols are used from them.
19 # But those dependencies need to be kept for things to work properly.
20 # Ideally, we'd only add -Wl,--no-as-needed if necessary, but it's just simpler
21 # to add it unconditionally. This library is also simple enough that forcing
22 # -Wl,--as-needed after the gtk libraries is not going to make a significant
23 # difference.
24 if CONFIG["GCC_USE_GNU_LD"]:
25     no_as_needed = ["-Wl,--no-as-needed"]
26     as_needed = ["-Wl,--as-needed"]
27 else:
28     no_as_needed = []
29     as_needed = []
31 OS_LIBS += [f for f in CONFIG["MOZ_GTK3_LIBS"] if f.startswith("-L")]
32 OS_LIBS += no_as_needed
33 OS_LIBS += [
34     "gtk-3",
35     "gdk-3",
37 OS_LIBS += as_needed