From 0c9b7b33768aa5de5a49a271e33877acf3afefc9 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sun, 24 Dec 2023 00:16:33 +0000 Subject: [PATCH] chore: Disable targets for cross-compilation. This way we can do bazel build //... when cross-compiling. --- BUILD.bazel | 2 ++ audio/BUILD.bazel | 4 ++++ src/BUILD.bazel | 4 ++++ test/BUILD.bazel | 2 ++ util/BUILD.bazel | 1 + 5 files changed, 13 insertions(+) diff --git a/BUILD.bazel b/BUILD.bazel index 2d9a14db96..be63df41b6 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -43,12 +43,14 @@ cc_library( ":res", ":translations", ], + tags = ["no-cross"], visibility = ["//qtox:__subpackages__"], alwayslink = True, ) cc_binary( name = "qtox", + tags = ["no-cross"], visibility = ["//qtox:__subpackages__"], deps = ["//qtox/src:main"], ) diff --git a/audio/BUILD.bazel b/audio/BUILD.bazel index 91ebb039bd..288c331a5a 100644 --- a/audio/BUILD.bazel +++ b/audio/BUILD.bazel @@ -12,6 +12,7 @@ qt_moc( ], hdrs = glob(["**/*.h"]), mocopts = ["-Iqtox/audio/include"], + tags = ["no-cross"], deps = ["//qtox/util"], ) @@ -19,11 +20,13 @@ qt_rcc( name = "audio_res", srcs = ["resources/audio_res.qrc"], data = glob(["resources/*.pcm"]), + tags = ["no-cross"], ) cc_library( name = "audio_res_lib", srcs = [":audio_res"], + tags = ["no-cross"], visibility = ["//qtox:__subpackages__"], alwayslink = True, ) @@ -52,6 +55,7 @@ cc_library( "UPDATE_CHECK_ENABLED", ], includes = ["include"], + tags = ["no-cross"], visibility = ["//qtox:__subpackages__"], deps = [ ":audio_res_lib", diff --git a/src/BUILD.bazel b/src/BUILD.bazel index 2cace110a2..c94bea2211 100644 --- a/src/BUILD.bazel +++ b/src/BUILD.bazel @@ -117,6 +117,7 @@ qt_moc( "-Iqtox", "-Iqtox/util/include", ], + tags = ["no-cross"], deps = [ "//qtox/util", "@qt//:qt_widgets", @@ -126,6 +127,7 @@ qt_moc( qt_uic( name = "src_ui", srcs = glob(["**/*.ui"]), + tags = ["no-cross"], ) objc_library( @@ -220,6 +222,7 @@ cc_library( "//tools/config:osx": ["-framework IOKit"], "//tools/config:windows": [], }), + tags = ["no-cross"], visibility = ["//qtox:__subpackages__"], deps = [ "//c-toxcore", @@ -265,6 +268,7 @@ cc_library( "//tools/config:osx": [], "//tools/config:windows": [], }), + tags = ["no-cross"], visibility = ["//qtox:__subpackages__"], deps = [ ":src", diff --git a/test/BUILD.bazel b/test/BUILD.bazel index 58953b53ee..e1c8c71274 100644 --- a/test/BUILD.bazel +++ b/test/BUILD.bazel @@ -8,6 +8,7 @@ qt_moc( "-Iqtox", "-Iqtox/util/include", ], + tags = ["no-cross"], deps = [ "//qtox/src", "//qtox/util", @@ -25,6 +26,7 @@ cc_library( "//tools/config:windows": [], }), includes = ["mock/include"], + tags = ["no-cross"], deps = ["//qtox/src"], ) diff --git a/util/BUILD.bazel b/util/BUILD.bazel index f0c1b1b3cf..9bc4254bcd 100644 --- a/util/BUILD.bazel +++ b/util/BUILD.bazel @@ -22,6 +22,7 @@ cc_library( "UPDATE_CHECK_ENABLED", ], includes = ["include"], + tags = ["no-cross"], visibility = ["//qtox:__subpackages__"], deps = [ "//c-toxcore",