-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add [email protected] with required library sources. (#3220)
- Loading branch information
Showing
6 changed files
with
162 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../MODULE.bazel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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=" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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": {} | ||
} |