Debian Codegraph @

build/unix/elfhack/moz.build

raw
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/.
6
7 DIST_INSTALL = False
8 DIRS += ["inject"]
9
10 if CONFIG["RELRHACK"]:
11 HOST_SOURCES += [
12 "relrhack.cpp",
13 ]
14
15 HostProgram(CONFIG["RELRHACK_LINKER"])
16
17 HOST_OS_LIBS += CONFIG["RELRHACK_LIBS"]
18
19 if CONFIG["MOZ_STDCXX_COMPAT"]:
20 HOST_DEFINES["MOZ_STDCXX_COMPAT"] = True
21 else:
22 HOST_SOURCES += [
23 "elf.cpp",
24 "elfhack.cpp",
25 ]
26
27 HostProgram("elfhack")
28
29 if not CONFIG["CROSS_COMPILE"]:
30 SOURCES += [
31 "dummy.c",
32 ]
33 SOURCES["dummy.c"].flags += ["-fno-lto"]
34
35 SOURCES += [
36 "test-array.c",
37 "test-ctors.c",
38 ]
39 SOURCES["test-array.c"].flags += ["-fno-lto"]
40 SOURCES["test-ctors.c"].flags += ["-fno-lto"]
41
42 NO_PGO = True
43
44 COMPILE_FLAGS["OS_CXXFLAGS"] = [
45 f for f in COMPILE_FLAGS["OS_CXXFLAGS"] if f != "-fno-exceptions"
46 ] + ["-fexceptions"]