Skip to content

Commit

Permalink
rename: pure_c -> no_libstdcxx (f0rmiga#37)
Browse files Browse the repository at this point in the history
* rename: pure_c -> no_libstdcxx

This translates better the intention of the feature as there are other
cases we may want to tweak this feature even when compiling C++. E.g.
when linking against another libstdc++.so the user may want.

Signed-off-by: Thulio Ferraz Assis <[email protected]>

* fix: generated docs

Signed-off-by: Thulio Ferraz Assis <[email protected]>
  • Loading branch information
f0rmiga authored May 30, 2022
1 parent 4147afa commit 23609a8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions docs/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/defs.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/hello_world_c/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
cc_binary(
name = "hello_world_c",
srcs = ["main.c"],
features = ["pure_c"],
features = ["no_libstdcxx"],
)

platform_transition_filegroup(
Expand Down
8 changes: 4 additions & 4 deletions toolchain/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _impl(ctx):
tools = [tool(path = objcopy_tool)],
)

pure_c_feature = feature(name = "pure_c")
no_libstdcxx_feature = feature(name = "no_libstdcxx")
static_libstdcxx_feature = feature(name = "static_libstdcxx")

default_link_flags_feature = feature(
Expand Down Expand Up @@ -112,7 +112,7 @@ def _impl(ctx):
with_features = [
with_feature_set(
not_features = [
"pure_c",
"no_libstdcxx",
"static_libstdcxx",
],
),
Expand All @@ -127,7 +127,7 @@ def _impl(ctx):
],
with_features = [
with_feature_set(
not_features = ["pure_c"],
not_features = ["no_libstdcxx"],
features = ["static_libstdcxx"],
),
],
Expand Down Expand Up @@ -388,7 +388,7 @@ def _impl(ctx):
default_compile_flags_feature,
include_paths_feature,
library_search_directories_feature,
pure_c_feature,
no_libstdcxx_feature,
static_libstdcxx_feature,
default_link_flags_feature,
supports_dynamic_linker_feature,
Expand Down
2 changes: 1 addition & 1 deletion toolchain/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ _DOWNLOAD_TOOLCHAIN_ATTRS = {

_FEATURE_ATTRS = {
"bazel_gcc_toolchain_workspace_name": attr.string(
doc = "The name give to the repository when imported bazel_gcc_toolchain.",
doc = "The name given to the repository when imported bazel_gcc_toolchain.",
default = "bazel_gcc_toolchain",
),
"binary_prefix": attr.string(
Expand Down

0 comments on commit 23609a8

Please sign in to comment.