From daaa82a42bf5abe49d339826fc7deea33621a420 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 19 Nov 2024 13:29:44 -0800 Subject: [PATCH] Add boost.context@1.83.0.bcr.2 with required library sources. --- .../boost.context/1.83.0.bcr.2/MODULE.bazel | 17 +++ .../1.83.0.bcr.2/overlay/BUILD.bazel | 112 ++++++++++++++++++ .../1.83.0.bcr.2/overlay/MODULE.bazel | 1 + .../boost.context/1.83.0.bcr.2/presubmit.yml | 20 ++++ .../boost.context/1.83.0.bcr.2/source.json | 10 ++ modules/boost.context/metadata.json | 3 +- 6 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 modules/boost.context/1.83.0.bcr.2/MODULE.bazel create mode 100644 modules/boost.context/1.83.0.bcr.2/overlay/BUILD.bazel create mode 120000 modules/boost.context/1.83.0.bcr.2/overlay/MODULE.bazel create mode 100644 modules/boost.context/1.83.0.bcr.2/presubmit.yml create mode 100644 modules/boost.context/1.83.0.bcr.2/source.json diff --git a/modules/boost.context/1.83.0.bcr.2/MODULE.bazel b/modules/boost.context/1.83.0.bcr.2/MODULE.bazel new file mode 100644 index 00000000000..459f427bd4e --- /dev/null +++ b/modules/boost.context/1.83.0.bcr.2/MODULE.bazel @@ -0,0 +1,17 @@ +module( + name = "boost.context", + version = "1.83.0.bcr.2", + bazel_compatibility = [">=7.2.1"], + compatibility_level = 108300, +) + +bazel_dep(name = "bazel_skylib", version = "1.3.0") +bazel_dep(name = "boost.assert", version = "1.83.0.bcr.1") +bazel_dep(name = "boost.config", version = "1.83.0.bcr.1") +bazel_dep(name = "boost.core", version = "1.83.0.bcr.1") +bazel_dep(name = "boost.mp11", version = "1.83.0.bcr.1") +bazel_dep(name = "boost.pool", version = "1.83.0.bcr.1") +bazel_dep(name = "boost.predef", version = "1.83.0.bcr.1") +bazel_dep(name = "boost.smart_ptr", version = "1.83.0.bcr.1") +bazel_dep(name = "platforms", version = "0.0.10") +bazel_dep(name = "rules_cc", version = "0.0.13") diff --git a/modules/boost.context/1.83.0.bcr.2/overlay/BUILD.bazel b/modules/boost.context/1.83.0.bcr.2/overlay/BUILD.bazel new file mode 100644 index 00000000000..f4ac8351d69 --- /dev/null +++ b/modules/boost.context/1.83.0.bcr.2/overlay/BUILD.bazel @@ -0,0 +1,112 @@ +load("@bazel_skylib//rules:copy_file.bzl", "copy_file") +load("@rules_cc//cc:defs.bzl", "cc_library") + +# Rename .asm to .S so that it will be handled with the C preprocessor. +[copy_file( + name = "rename_%s" % name, + src = "src/asm/%s_x86_64_ms_pe_masm.asm" % name, + out = "src/asm/%s_x86_64_ms_pe_masm.S" % name, +) for name in [ + "make", + "jump", + "ontop", +]] + +filegroup( + name = "elf_asm", + srcs = select({ + "@platforms//cpu:aarch64": [ + "src/asm/jump_arm64_aapcs_elf_gas.S", + "src/asm/make_arm64_aapcs_elf_gas.S", + "src/asm/ontop_arm64_aapcs_elf_gas.S", + ], + "@platforms//cpu:arm": [ + "src/asm/jump_arm_aapcs_elf_gas.S", + "src/asm/make_arm_aapcs_elf_gas.S", + "src/asm/ontop_arm_aapcs_elf_gas.S", + ], + "@platforms//cpu:x86_64": [ + "src/asm/jump_x86_64_sysv_elf_gas.S", + "src/asm/make_x86_64_sysv_elf_gas.S", + "src/asm/ontop_x86_64_sysv_elf_gas.S", + ], + }), +) + +filegroup( + name = "apple_asm", + srcs = select({ + "@platforms//cpu:aarch64": [ + "src/asm/jump_arm64_aapcs_macho_gas.S", + "src/asm/make_arm64_aapcs_macho_gas.S", + "src/asm/ontop_arm64_aapcs_macho_gas.S", + ], + "@platforms//cpu:arm": [ + "src/asm/jump_arm_aapcs_macho_gas.S", + "src/asm/make_arm_aapcs_macho_gas.S", + "src/asm/ontop_arm_aapcs_macho_gas.S", + ], + "@platforms//cpu:x86_64": [ + "src/asm/jump_x86_64_sysv_macho_gas.S", + "src/asm/make_x86_64_sysv_macho_gas.S", + "src/asm/ontop_x86_64_sysv_macho_gas.S", + ], + }), +) + +cc_library( + name = "boost.context", + srcs = select({ + "@platforms//os:windows": [ + "src/asm/jump_x86_64_ms_pe_masm.S", + "src/asm/make_x86_64_ms_pe_masm.S", + "src/asm/ontop_x86_64_ms_pe_masm.S", + "src/windows/stack_traits.cpp", + ], + "@platforms//os:macos": [ + "src/posix/stack_traits.cpp", + ":apple_asm", + ], + "//conditions:default": [ + "src/posix/stack_traits.cpp", + ":elf_asm", + ], + }), + hdrs = glob( + [ + "include/**/*.hpp", + ], + exclude = [ + "include/boost/context/continuation_winfib.hpp", + "include/boost/context/fiber_winfib.hpp", + "include/boost/context/posix/segmented_stack.hpp", + "include/boost/context/preallocated.hpp", + "include/boost/context/windows/protected_fixedsize_stack.hpp", + ], + ), + features = [ + "parse_headers", + ], + includes = ["include"], + local_defines = select({ + "@platforms//os:windows": ["BOOST_CONTEXT_EXPORT="], + "//conditions:default": [], + }), + textual_hdrs = [ + "include/boost/context/continuation_winfib.hpp", + "include/boost/context/fiber_winfib.hpp", + "include/boost/context/posix/segmented_stack.hpp", + "include/boost/context/preallocated.hpp", + "include/boost/context/windows/protected_fixedsize_stack.hpp", + ], + visibility = ["//visibility:public"], + deps = [ + "@boost.assert", + "@boost.config", + "@boost.core", + "@boost.mp11", + "@boost.pool", + "@boost.predef", + "@boost.smart_ptr", + ], +) diff --git a/modules/boost.context/1.83.0.bcr.2/overlay/MODULE.bazel b/modules/boost.context/1.83.0.bcr.2/overlay/MODULE.bazel new file mode 120000 index 00000000000..9b599e3ad9c --- /dev/null +++ b/modules/boost.context/1.83.0.bcr.2/overlay/MODULE.bazel @@ -0,0 +1 @@ +../MODULE.bazel \ No newline at end of file diff --git a/modules/boost.context/1.83.0.bcr.2/presubmit.yml b/modules/boost.context/1.83.0.bcr.2/presubmit.yml new file mode 100644 index 00000000000..95fbbdb822f --- /dev/null +++ b/modules/boost.context/1.83.0.bcr.2/presubmit.yml @@ -0,0 +1,20 @@ +matrix: + platform: + - debian10 + - debian11 + - macos + - macos_arm64 + - ubuntu2004 + - ubuntu2204 + - ubuntu2404 + - windows + bazel: [7.x, rolling] +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_flags: + - '--process_headers_in_dependencies' + build_targets: + - '@boost.context//:boost.context' diff --git a/modules/boost.context/1.83.0.bcr.2/source.json b/modules/boost.context/1.83.0.bcr.2/source.json new file mode 100644 index 00000000000..dfbb3ae9ba5 --- /dev/null +++ b/modules/boost.context/1.83.0.bcr.2/source.json @@ -0,0 +1,10 @@ +{ + "integrity": "sha256-/MbSfQikFDWSwmkTTdI7K3qGkW36YhmZW9JKTu/P5Oo=", + "strip_prefix": "context-boost-1.83.0", + "url": "https://github.com/boostorg/context/archive/refs/tags/boost-1.83.0.tar.gz", + "patch_strip": 0, + "overlay": { + "MODULE.bazel": "sha256-ntEJGQzI52xkPjx1IQTxnQWVftsCIDyVhGB/zpAoi1s=", + "BUILD.bazel": "sha256-QQmw7I62WkUBY1Gs04lpDyXHM5eTTE+TwanMCLFan6s=" + } +} diff --git a/modules/boost.context/metadata.json b/modules/boost.context/metadata.json index a7324036a6e..45ec4cc61b3 100644 --- a/modules/boost.context/metadata.json +++ b/modules/boost.context/metadata.json @@ -17,7 +17,8 @@ ], "versions": [ "1.83.0", - "1.83.0.bcr.1" + "1.83.0.bcr.1", + "1.83.0.bcr.2" ], "yanked_versions": {} }