-
Notifications
You must be signed in to change notification settings - Fork 509
tcmalloc rust bindings #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
tcmalloc/BUILD
Outdated
load("//tcmalloc:copts.bzl", "TCMALLOC_DEFAULT_COPTS") | ||
load("//tcmalloc:variants.bzl", "create_tcmalloc_benchmark", "create_tcmalloc_libraries", "create_tcmalloc_testsuite") | ||
|
||
package(default_visibility = ["//visibility:private"]) | ||
|
||
licenses(["notice"]) | ||
|
||
exports_files(["LICENSE"]) | ||
exports_files(["LICENSE", "tcmalloc.h"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export of tcmalloc.h
required to generate rust bindings.
bool_flag( | ||
name = "alwayslink", | ||
build_setting_default = True, | ||
) | ||
|
||
config_setting( | ||
name = "unlinked", | ||
flag_values = { | ||
":alwayslink": "false", | ||
}, | ||
visibility = ["//visibility:public"], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alwayslink
generates a .lo
file which is not recognized by rustc
. This flags allws users to disable it for rust specifically.
61ccfdb
to
ed11cc4
Compare
a78505e
to
f9e8f49
Compare
f9e8f49
to
fc939a7
Compare
111af67
to
27b9533
Compare
Added
tcmalloc_rs
which generates necessary rust bindings and surfaces a lib for rust users to adopttcmalloc
.