mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 14:41:42 +03:00
fix: build with --stamp
This commit is contained in:
parent
7f192e9919
commit
8949bbe68a
9 changed files with 16 additions and 95 deletions
|
|
@ -1,6 +1,6 @@
|
|||
module(
|
||||
name = "jemalloc",
|
||||
version = "5.3.0-bcr.alpha.1",
|
||||
version = "5.3.0-bcr.alpha.2",
|
||||
bazel_compatibility = [">=7.2.1"],
|
||||
compatibility_level = 5,
|
||||
)
|
||||
|
|
|
|||
28
MODULE.bazel.lock
generated
28
MODULE.bazel.lock
generated
|
|
@ -89,8 +89,8 @@
|
|||
"https://bcr.bazel.build/modules/rules_java/7.2.0/MODULE.bazel": "06c0334c9be61e6cef2c8c84a7800cef502063269a5af25ceb100b192453d4ab",
|
||||
"https://bcr.bazel.build/modules/rules_java/7.3.2/MODULE.bazel": "50dece891cfdf1741ea230d001aa9c14398062f2b7c066470accace78e412bc2",
|
||||
"https://bcr.bazel.build/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe",
|
||||
"https://bcr.bazel.build/modules/rules_java/8.6.1/MODULE.bazel": "f4808e2ab5b0197f094cabce9f4b006a27766beb6a9975931da07099560ca9c2",
|
||||
"https://bcr.bazel.build/modules/rules_java/8.6.1/source.json": "f18d9ad3c4c54945bf422ad584fa6c5ca5b3116ff55a5b1bc77e5c1210be5960",
|
||||
"https://bcr.bazel.build/modules/rules_java/8.11.0/MODULE.bazel": "c3d280bc5ff1038dcb3bacb95d3f6b83da8dd27bba57820ec89ea4085da767ad",
|
||||
"https://bcr.bazel.build/modules/rules_java/8.11.0/source.json": "302b52a39259a85aa06ca3addb9787864ca3e03b432a5f964ea68244397e7544",
|
||||
"https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7",
|
||||
"https://bcr.bazel.build/modules/rules_jvm_external/5.1/MODULE.bazel": "33f6f999e03183f7d088c9be518a63467dfd0be94a11d0055fe2d210f89aa909",
|
||||
"https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036",
|
||||
|
|
@ -600,28 +600,6 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"@@rules_java+//java:rules_java_deps.bzl%compatibility_proxy": {
|
||||
"general": {
|
||||
"bzlTransitiveDigest": "84xJEZ1jnXXwo8BXMprvBm++rRt4jsTu9liBxz0ivps=",
|
||||
"usagesDigest": "jTQDdLDxsS43zuRmg1faAjIEPWdLAbDAowI1pInQSoo=",
|
||||
"recordedFileInputs": {},
|
||||
"recordedDirentsInputs": {},
|
||||
"envVariables": {},
|
||||
"generatedRepoSpecs": {
|
||||
"compatibility_proxy": {
|
||||
"repoRuleId": "@@rules_java+//java:rules_java_deps.bzl%_compatibility_proxy_repo_rule",
|
||||
"attributes": {}
|
||||
}
|
||||
},
|
||||
"recordedRepoMappingEntries": [
|
||||
[
|
||||
"rules_java+",
|
||||
"bazel_tools",
|
||||
"bazel_tools"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"@@rules_kotlin+//src/main/starlark/core/repositories:bzlmod_setup.bzl%rules_kotlin_extensions": {
|
||||
"general": {
|
||||
"bzlTransitiveDigest": "sFhcgPbDQehmbD1EOXzX4H1q/CD5df8zwG4kp4jbvr8=",
|
||||
|
|
@ -688,7 +666,7 @@
|
|||
},
|
||||
"@@rules_python+//python/private/pypi:pip.bzl%pip_internal": {
|
||||
"general": {
|
||||
"bzlTransitiveDigest": "Ktlvuwl7iL6H5Xizfvv0C5YgMwxj7b5iMqQlU33QDP4=",
|
||||
"bzlTransitiveDigest": "hvKweoM9/zduyw8QX3arHXJQWZdHQBLRU6qcww8Z0So=",
|
||||
"usagesDigest": "OLoIStnzNObNalKEMRq99FqenhPGLFZ5utVLV4sz7OI=",
|
||||
"recordedFileInputs": {
|
||||
"@@rules_python+//tools/publish/requirements_darwin.txt": "2994136eab7e57b083c3de76faf46f70fad130bc8e7360a7fed2b288b69e79dc",
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
def _settings_transition_impl(settings, attr):
|
||||
return {
|
||||
"@jemalloc//settings/flags:jemalloc_prefix": "je_",
|
||||
"@jemalloc//settings/flags:jemalloc_cprefix": "JE_",
|
||||
}
|
||||
|
||||
_settings_transition = transition(
|
||||
implementation = _settings_transition_impl,
|
||||
inputs = [
|
||||
"@jemalloc//settings/flags:jemalloc_prefix",
|
||||
"@jemalloc//settings/flags:jemalloc_cprefix",
|
||||
],
|
||||
outputs = [
|
||||
"@jemalloc//settings/flags:jemalloc_prefix",
|
||||
"@jemalloc//settings/flags:jemalloc_cprefix",
|
||||
# "//settings/platform:lg_page",
|
||||
],
|
||||
)
|
||||
|
||||
def _transition_settings_impl(ctx):
|
||||
return [ctx.attr.src[0][DefaultInfo]]
|
||||
|
||||
# target = ctx.attr.src
|
||||
# possible_providers = [
|
||||
# DefaultInfo,
|
||||
# CcInfo,
|
||||
# InstrumentedFilesInfo,
|
||||
# OutputGroupInfo,
|
||||
# ]
|
||||
#
|
||||
# print(target[0])
|
||||
#
|
||||
# return [target[0][provider] for provider in possible_providers if provider in target[0]]
|
||||
|
||||
transition_settings = rule(
|
||||
implementation = _transition_settings_impl,
|
||||
attrs = {
|
||||
"target": attr.label(cfg = _settings_transition),
|
||||
"_allowlist_function_transition": attr.label(
|
||||
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
|
||||
),
|
||||
},
|
||||
)
|
||||
|
||||
platform_transition_binary = rule(
|
||||
implementation = _platform_transition_binary_impl,
|
||||
attrs = {
|
||||
"basename": attr.string(),
|
||||
"binary": attr.label(allow_files = True, cfg = binary_cfg),
|
||||
"target_platform": attr.label(
|
||||
doc = "The target platform to transition the binary.",
|
||||
mandatory = True,
|
||||
),
|
||||
"_allowlist_function_transition": attr.label(
|
||||
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
|
||||
),
|
||||
},
|
||||
executable = True,
|
||||
doc = "Transitions the binary to use the provided platform. Will forward RunEnvironmentInfo",
|
||||
)
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
|
||||
load("//:tools/autoconf.bzl", "configure_header", "define_macro_if", "define_macro_with")
|
||||
load("//:tools/version.bzl", "parse_version")
|
||||
load("//tools:autoconf.bzl", "configure_header", "define_macro_if", "define_macro_with")
|
||||
load("//tools:version.bzl", "parse_version")
|
||||
|
||||
version = parse_version(module_version())
|
||||
|
||||
configure_header(
|
||||
name = "jemalloc_defs",
|
||||
out = "jemalloc_defs.h",
|
||||
stamp = 0,
|
||||
substitutions =
|
||||
define_macro_if("JEMALLOC_HAVE_ATTR_ALLOC_SIZE", "//settings/compiler:gcc_compatible") |
|
||||
define_macro_if("JEMALLOC_HAVE_ATTR_FORMAT_ARG", "//settings/compiler:gcc_compatible") |
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//:tools/autoconf.bzl", "configure_header", "define_macro_if", "define_macro_if_any", "define_macro_if_with", "define_macro", "define_macro_with", "undefine_macro")
|
||||
load("//:tools/version.bzl", "parse_version")
|
||||
load("//tools:autoconf.bzl", "configure_header", "define_macro", "define_macro_if", "define_macro_if_any", "define_macro_if_with", "define_macro_with", "undefine_macro")
|
||||
load("//tools:version.bzl", "parse_version")
|
||||
load(":private_namespace.bzl", "private_namespace")
|
||||
load(":public_symbols.bzl", "public_symbols")
|
||||
|
||||
|
|
@ -148,6 +148,7 @@ cc_library(
|
|||
expand_template(
|
||||
name = "jemalloc_preamble",
|
||||
out = "jemalloc_preamble.h",
|
||||
stamp = 0,
|
||||
substitutions = {
|
||||
"@install_suffix@": "",
|
||||
"@private_namespace@": "je_",
|
||||
|
|
@ -224,6 +225,7 @@ selects.config_setting_group(
|
|||
configure_header(
|
||||
name = "jemalloc_internal_defs",
|
||||
out = "jemalloc_internal_defs.h",
|
||||
stamp = 0,
|
||||
substitutions =
|
||||
select({
|
||||
"//settings/flags:no_jemalloc_prefix": undefine_macro("JEMALLOC_PREFIX") |
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
load("//:tools/cc.bzl", "COPTS")
|
||||
load("//tools:cc.bzl", "COPTS")
|
||||
|
||||
expand_template(
|
||||
name = "jemalloc_test",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//:tools/cc.bzl", "COPTS")
|
||||
load("//:tools/transition.bzl", "PLATFORM", "transition_default_constraints")
|
||||
load("//tools:cc.bzl", "COPTS")
|
||||
load("//tools:transition.bzl", "PLATFORM", "transition_default_constraints")
|
||||
|
||||
INTEGRATION_TESTS = [
|
||||
{"src": "allocated.c"},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
load("//:tools/cc.bzl", "COPTS")
|
||||
load("//:tools/transition.bzl", "PLATFORM", "transition_default_constraints")
|
||||
load("//tools:cc.bzl", "COPTS")
|
||||
load("//tools:transition.bzl", "PLATFORM", "transition_default_constraints")
|
||||
|
||||
# TODO: Handle conf when enable_prof = True
|
||||
#{ "src": "batch_alloc_prof.c" },
|
||||
|
|
|
|||
0
tools/BUILD.bazel
Normal file
0
tools/BUILD.bazel
Normal file
Loading…
Add table
Add a link
Reference in a new issue