moz.build (2707B)
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 with Files("**"): 8 BUG_COMPONENT = ("Core", "Graphics: WebGPU") 9 10 MOCHITEST_MANIFESTS += [ 11 "tests/mochitest/mochitest-no-pref.toml", 12 "tests/mochitest/mochitest-resistfingerprinting.toml", 13 "tests/mochitest/mochitest.toml", 14 "tests/mochitest/perftest.toml", 15 ] 16 17 REFTEST_MANIFESTS += ["tests/reftest/reftest.list"] 18 19 DIRS += [] 20 21 h_and_cpp = [ 22 "Adapter", 23 "BindGroup", 24 "BindGroupLayout", 25 "Buffer", 26 "CanvasContext", 27 "CommandBuffer", 28 "CommandEncoder", 29 "CompilationInfo", 30 "CompilationMessage", 31 "ComputePassEncoder", 32 "ComputePipeline", 33 "Device", 34 "DeviceLostInfo", 35 "Error", 36 "ExternalTexture", 37 "Instance", 38 "InternalError", 39 "ObjectModel", 40 "OutOfMemoryError", 41 "PipelineError", 42 "PipelineLayout", 43 "QuerySet", 44 "Queue", 45 "RenderBundle", 46 "RenderBundleEncoder", 47 "RenderPassEncoder", 48 "RenderPipeline", 49 "Sampler", 50 "ShaderModule", 51 "SharedTexture", 52 "SupportedFeatures", 53 "SupportedLimits", 54 "Texture", 55 "TextureView", 56 "Utility", 57 "ValidationError", 58 ] 59 EXPORTS.mozilla.webgpu += [x + ".h" for x in h_and_cpp] 60 UNIFIED_SOURCES += [x + ".cpp" for x in h_and_cpp] 61 62 IPDL_SOURCES += [ 63 "ipc/PWebGPU.ipdl", 64 "ipc/PWebGPUTypes.ipdlh", 65 ] 66 67 EXPORTS.mozilla.webgpu += [ 68 "ipc/WebGPUChild.h", 69 "ipc/WebGPUParent.h", 70 "ipc/WebGPUSerialize.h", 71 "ipc/WebGPUTypes.h", 72 ] 73 74 UNIFIED_SOURCES += [ 75 "ipc/WebGPUChild.cpp", 76 "ipc/WebGPUParent.cpp", 77 ] 78 79 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": 80 EXPORTS.mozilla.webgpu += [ 81 "SharedTextureD3D11.h", 82 ] 83 UNIFIED_SOURCES += [ 84 "SharedTextureD3D11.cpp", 85 ] 86 87 if CONFIG["OS_TARGET"] == "Linux": 88 EXPORTS.mozilla.webgpu += [ 89 "SharedTextureDMABuf.h", 90 ] 91 UNIFIED_SOURCES += [ 92 "SharedTextureDMABuf.cpp", 93 ] 94 95 96 if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("cocoa", "uikit"): 97 EXPORTS.mozilla.webgpu += [ 98 "SharedTextureMacIOSurface.h", 99 ] 100 UNIFIED_SOURCES += [ 101 "SharedTextureMacIOSurface.cpp", 102 ] 103 104 if CONFIG["MOZ_DXCOMPILER"] and not CONFIG["MOZ_ARTIFACT_BUILDS"]: 105 FINAL_TARGET_FILES += [ 106 "%" + CONFIG["MOZ_DXC_DLL_PATH"], 107 ] 108 109 if CONFIG["CC_TYPE"] in ("clang", "clang-cl"): 110 CXXFLAGS += ["-Werror=implicit-int-conversion", "-Wno-shorten-64-to-32"] 111 CXXFLAGS += ["-Werror=switch"] 112 113 include("/ipc/chromium/chromium-config.mozbuild") 114 115 FINAL_LIBRARY = "xul"