moz.build (2037B)
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 GeckoProgram("gdb-tests", linkage=None) 8 9 include("../js-cxxflags.mozbuild") 10 include("../js-standalone.mozbuild") 11 12 SOURCES += [ 13 # This file must not be unified with any of the test files, or the use() 14 # and breakpoint() functions might get optimized out. 15 "gdb-tests.cpp" 16 ] 17 18 UNIFIED_SOURCES += [ 19 "tests/enum-printers.cpp", 20 "tests/test-asmjs.cpp", 21 "tests/test-ExecutableAllocator.cpp", 22 "tests/test-GCCellPtr.cpp", 23 "tests/test-Interpreter.cpp", 24 "tests/test-jsbytecode.cpp", 25 "tests/test-jsid.cpp", 26 "tests/test-JSObject.cpp", 27 "tests/test-jsop.cpp", 28 "tests/test-JSString.cpp", 29 "tests/test-JSSymbol.cpp", 30 "tests/test-jsval.cpp", 31 "tests/test-Root.cpp", 32 "tests/test-unwind.cpp", 33 "tests/typedef-printers.cpp", 34 ] 35 36 SOURCES += ["tests/test-prettyprinters.cpp"] 37 38 if CONFIG["CC_TYPE"] != "clang-cl": 39 # Test expects to see pre-typedef names of base classes, but the compiler will 40 # normally omit those from the debuginfo. The current clang-cl does not support 41 # this option. 42 SOURCES["tests/test-prettyprinters.cpp"].flags += [ 43 "-fno-eliminate-unused-debug-types", 44 ] 45 46 if CONFIG["CC_TYPE"] == "clang": 47 # Clang may complain that -fno-eliminate-unused-debug-types is unused when used 48 # in conjunction with other flags such as -gline-tables-only. 49 SOURCES["tests/test-prettyprinters.cpp"].flags += [ 50 "-Qunused-arguments", 51 ] 52 53 DEFINES["EXPORT_JS_API"] = True 54 55 LOCAL_INCLUDES += [ 56 "!..", 57 "..", 58 ] 59 60 USE_LIBS += [ 61 "static:js", 62 ] 63 64 if CONFIG["MOZ_LTO_FAT"]: 65 LDFLAGS += ["-fno-lto"] 66 67 68 DEFINES["topsrcdir"] = "%s/js/src" % TOPSRCDIR 69 FINAL_TARGET_PP_FILES += ["gdb-tests-gdb.py.in"] 70 OBJDIR_FILES.js.src.gdb += ["!/dist/bin/gdb-tests-gdb.py"]