moz.build (3224B)
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 # dummy library name to avoid skipping building the sources here. 8 Library("clang-plugin-tests") 9 10 SOURCES += [ 11 "TestAssertWithAssignment.cpp", 12 "TestBadImplicitConversionCtor.cpp", 13 "TestCanRunScript.cpp", 14 "TestCustomHeap.cpp", 15 "TestDanglingOnTemporary.cpp", 16 "TestExplicitOperatorBool.cpp", 17 "TestGlobalClass.cpp", 18 "TestGlobalVariableInitialization.cpp", 19 "TestHeapClass.cpp", 20 "TestInheritTypeAnnotationsFromTemplateArgs.cpp", 21 "TestJSHandleRootedTypedef.cpp", 22 "TestKnownLive.cpp", 23 "TestKungFuDeathGrip.cpp", 24 "TestMultipleAnnotations.cpp", 25 "TestMustOverride.cpp", 26 "TestMustReturnFromCaller.cpp", 27 "TestNANTestingExpr.cpp", 28 "TestNANTestingExprC.c", 29 "TestNeedsNoVTableType.cpp", 30 "TestNoAddRefReleaseOnReturn.cpp", 31 "TestNoArithmeticExprInArgument.cpp", 32 "TestNoAutoType.cpp", 33 "TestNoDuplicateRefCntMember.cpp", 34 "TestNoExplicitMoveConstructor.cpp", 35 "TestNoNewThreadsChecker.cpp", 36 "TestNonHeapClass.cpp", 37 "TestNonMemMovable.cpp", 38 "TestNonMemMovableStd.cpp", 39 "TestNonMemMovableStdAtomic.cpp", 40 "TestNonParameterChecker.cpp", 41 "TestNonTemporaryClass.cpp", 42 "TestNonTrivialTypeInFfi.cpp", 43 "TestNoPrincipalGetUri.cpp", 44 "TestNoRefcountedInsideLambdas.cpp", 45 "TestNoUsingNamespaceMozillaJava.cpp", 46 "TestOverrideBaseCall.cpp", 47 "TestOverrideBaseCallAnnotation.cpp", 48 "TestParamTraitsEnum.cpp", 49 "TestRefCountedCopyConstructor.cpp", 50 "TestRefCountedThisInsideConstructor.cpp", 51 "TestSprintfLiteral.cpp", 52 "TestStackClass.cpp", 53 "TestStaticLocalClass.cpp", 54 "TestTemporaryClass.cpp", 55 "TestTrivialCtorDtor.cpp", 56 "TestTrivialDtor.cpp", 57 ] 58 59 if CONFIG["OS_ARCH"] == "WINNT": 60 SOURCES += [ 61 "TestFopenUsage.cpp", 62 "TestLoadLibraryUsage.cpp", 63 ] 64 65 include("../external/tests/sources.mozbuild") 66 67 if CONFIG["ENABLE_CLANG_PLUGIN_ALPHA"]: 68 DEFINES["MOZ_CLANG_PLUGIN_ALPHA"] = "1" 69 include("../alpha/tests/sources.mozbuild") 70 71 DisableStlWrapping() 72 NoVisibilityFlags() 73 74 # Build without any warning flags, and with clang verify flag for a 75 # syntax-only build (no codegen), without a limit on the number of errors. 76 COMPILE_FLAGS["OS_CXXFLAGS"] = [ 77 f for f in COMPILE_FLAGS["OS_CXXFLAGS"] if not f.startswith("-W") 78 ] + [ 79 "-fsyntax-only", 80 "-Wno-unused-command-line-argument", 81 "-Xclang", 82 "-verify", 83 "-ferror-limit=0", 84 "-Wno-invalid-noreturn", 85 # For SpiderMonkey headers in TestJSHandleRootedTypedef.cpp 86 "-Wno-attributes", 87 "-Wno-invalid-offsetof", 88 ] 89 COMPILE_FLAGS["OS_CFLAGS"] = [ 90 f for f in COMPILE_FLAGS["OS_CFLAGS"] if not f.startswith("-W") 91 ] + [ 92 "-fsyntax-only", 93 "-Wno-unused-command-line-argument", 94 "-Xclang", 95 "-verify", 96 "-ferror-limit=0", 97 "-Wno-invalid-noreturn", 98 ] 99 100 # Don't reflect WARNINGS_CFLAGS into CFLAGS, as the warnings flags should be 101 # as specified in OS_CFLAGS above. 102 DisableCompilerWarnings()