Commit efba3119 authored by Gabriele Svelto's avatar Gabriele Svelto
Browse files

Bug 1747196 - Build the Web MIDI midir backend only on known supported...

Bug 1747196 - Build the Web MIDI midir backend only on known supported platforms rather than excluding unsupported ones r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D134491
parent 5f4fff5e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2020,7 +2020,6 @@ dependencies = [
 "log",
 "mapped_hyph",
 "mdns_service",
 "midir",
 "midir_impl",
 "mozurl",
 "mp4parse_capi",
+4 −4
Original line number Diff line number Diff line
@@ -7,9 +7,9 @@
#include "MIDIPlatformService.h"
#include "MIDIMessageQueue.h"
#include "TestMIDIPlatformService.h"
#ifndef MOZ_WIDGET_ANDROID
#ifdef MOZ_WEBMIDI_MIDIR_IMPL
#  include "midirMIDIPlatformService.h"
#endif  // MOZ_WIDGET_ANDROID
#endif  // MOZ_WEBMIDI_MIDIR_IMPL
#include "mozilla/ErrorResult.h"
#include "mozilla/StaticPrefs_midi.h"
#include "mozilla/StaticPtr.h"
@@ -185,11 +185,11 @@ MIDIPlatformService* MIDIPlatformService::Get() {
    if (StaticPrefs::midi_testing()) {
      gMIDIPlatformService = new TestMIDIPlatformService();
    }
#ifndef MOZ_WIDGET_ANDROID
#ifdef MOZ_WEBMIDI_MIDIR_IMPL
    else {
      gMIDIPlatformService = new midirMIDIPlatformService();
    }
#endif  // MOZ_WIDGET_ANDROID
#endif  // MOZ_WEBMIDI_MIDIR_IMPL
    gMIDIPlatformService->Init();
  }
  return gMIDIPlatformService;
+7 −9
Original line number Diff line number Diff line
@@ -4,9 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

if CONFIG["OS_TARGET"] != "Android":
    DIRS += ["midir_impl"]

IPDL_SOURCES += [
    "MIDITypes.ipdlh",
    "PMIDIManager.ipdl",
@@ -58,16 +55,17 @@ UNIFIED_SOURCES += [

include("/ipc/chromium/chromium-config.mozbuild")

if CONFIG["OS_TARGET"] == "Linux":
    OS_LIBS += ["asound"]  # Required by midir
    UNIFIED_SOURCES += ["AlsaCompatibility.cpp"]


if CONFIG["OS_TARGET"] != "Android":
if CONFIG["MOZ_WEBMIDI_MIDIR_IMPL"]:
    DEFINES["MOZ_WEBMIDI_MIDIR_IMPL"] = True
    DIRS += ["midir_impl"]
    UNIFIED_SOURCES += [
        "midirMIDIPlatformService.cpp",
    ]

    if CONFIG["OS_TARGET"] == "Linux":
        OS_LIBS += ["asound"]  # Required by midir
        UNIFIED_SOURCES += ["AlsaCompatibility.cpp"]

FINAL_LIBRARY = "xul"
LOCAL_INCLUDES += [
    "/dom/base",
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ glean_with_gecko = ["gkrust-shared/glean_with_gecko"]
with_dbus = ["gkrust-shared/with_dbus"]
thread_sanitizer = ["gkrust-shared/thread_sanitizer"]
oxidized_breakpad = ["gkrust-shared/oxidized_breakpad"]
webmidi_midir_impl = ["gkrust-shared/webmidi_midir_impl"]

[dependencies]
bench-collections-gtest = { path = "../../../../xpcom/rust/gtest/bench-collections" }
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ glean_with_gecko = ["gkrust-shared/glean_with_gecko"]
with_dbus = ["gkrust-shared/with_dbus"]
thread_sanitizer = ["gkrust-shared/thread_sanitizer"]
oxidized_breakpad = ["gkrust-shared/oxidized_breakpad"]
webmidi_midir_impl = ["gkrust-shared/webmidi_midir_impl"]

[dependencies]
gkrust-shared = { path = "shared" }
Loading