mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-12-01 22:16:27 +00:00
3cbd0a9938
* Add meson support * Modify zlib to be detected via pkgconfig in dependent rules * Modify zlib and expat to be linked to shared libs in dependent rules * Add example usage of Meson rule This commit adds the glib library to the "examples" build. glib requires pcre2, so pcre and libgit2 (a dependent of pcre) have been updated/modified * Add example usage of meson_with_requirements macro This commit adds mesa to the "examples" build. This commit also changes the "examples" build to use the hermetic python toolchain provided by rules_foreign_cc. As such, the python toolchain built by rules_foreign_cc is no longer used, as it cannot be used in workspace rules, .e.g pip_parse(). As such, the python2 build has been removed from the examples as python2 is end-of-life. Until Bazel 4.2.0, the built-in android toolchain required Python 2. As such the minimum supported version has been upversioned to 4.2.0. Note that the BAZEL_VC env var was removed from CI as mesa requires MSVC 2019. * Set visibility for each target in foreign_cc_rule_variant * Apply formatting changes * Get meson examples working with bzlmod Note that a newer version of pkgconfig than that installed in ubuntu 20 must be used to build libxau, therefore the built_pkgconfig_toolchain is now registered
50 lines
1.5 KiB
Python
50 lines
1.5 KiB
Python
load("@rules_python//python/pip_install:requirements.bzl", "compile_pip_requirements")
|
|
|
|
# TODO: This should not be necessary but there appears to be some inconsistent
|
|
# behavior with the use of `constraint_value`s in `select` statements. A support
|
|
# thread was started at the end of https://github.com/bazelbuild/bazel/pull/12071
|
|
# Once it is possible to replace `:windows` with `@platforms//os:windows` that
|
|
# should be done for this file. Note actioning on this will set the minimum
|
|
# supported version of Bazel to 4.0.0 for these examples.
|
|
config_setting(
|
|
name = "windows",
|
|
constraint_values = ["@platforms//os:windows"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
config_setting(
|
|
name = "macos",
|
|
constraint_values = ["@platforms//os:macos"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
test_suite(
|
|
name = "third_party_examples_linux_tests",
|
|
tags = ["manual"],
|
|
tests = ["@rules_foreign_cc_examples_third_party//:linux_tests"],
|
|
)
|
|
|
|
test_suite(
|
|
name = "third_party_examples_linux_rbe_tests",
|
|
tags = ["manual"],
|
|
tests = ["@rules_foreign_cc_examples_third_party//:linux_rbe_tests"],
|
|
)
|
|
|
|
test_suite(
|
|
name = "third_party_examples_macos_tests",
|
|
tags = ["manual"],
|
|
tests = ["@rules_foreign_cc_examples_third_party//:macos_tests"],
|
|
)
|
|
|
|
test_suite(
|
|
name = "third_party_examples_windows_tests",
|
|
tags = ["manual"],
|
|
tests = ["@rules_foreign_cc_examples_third_party//:windows_tests"],
|
|
)
|
|
|
|
compile_pip_requirements(
|
|
name = "requirements",
|
|
requirements_in = "requirements.txt",
|
|
requirements_txt = "requirements_lock.txt",
|
|
)
|