Skip to content

Commit

Permalink
fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jungleraptor committed Oct 6, 2023
1 parent 27dd4d1 commit 729f164
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions cc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports_files(
visibility = ["//visibility:public"],
)

# Disable tests and test libraries with --@rules_swiftnav//:disable_test=true
# Disable tests and test libraries with --@rules_swiftnav///cc:disable_test=true
bool_flag(
name = "disable_tests",
build_setting_default = False,
Expand All @@ -29,7 +29,7 @@ config_setting(
visibility = ["//visibility:public"],
)

# Enable exceptions with --@rules_swiftnav//:enable_exceptions=true
# Enable exceptions with --@rules_swiftnav//cc:enable_exceptions=true
bool_flag(
name = "enable_exceptions",
build_setting_default = False,
Expand All @@ -42,7 +42,7 @@ config_setting(
visibility = ["//visibility:public"],
)

# Enable rtti with --@rules_swiftnav//:enable_exceptions=true
# Enable rtti with --@rules_swiftnav//cc:enable_exceptions=true
bool_flag(
name = "enable_rtti",
build_setting_default = False,
Expand All @@ -55,6 +55,7 @@ config_setting(
visibility = ["//visibility:public"],
)

# Enable shared linking with --@rules_swiftnav//cc:enable_shared=true
bool_flag(
name = "enable_shared",
build_setting_default = False,
Expand Down Expand Up @@ -87,21 +88,21 @@ string_flag(
visibility = ["//visibility:public"],
)

# Enable with --@rules_swiftnav//:cxx_standard=17
# Enable with --@rules_swiftnav//cc:cxx_standard=17
config_setting(
name = "cxx17",
flag_values = {":cxx_standard": "17"},
visibility = ["//visibility:public"],
)

# Enable with --@rules_swiftnav//:cxx_standard=20
# Enable with --@rules_swiftnav//cc:cxx_standard=20
config_setting(
name = "cxx20",
flag_values = {":cxx_standard": "20"},
visibility = ["//visibility:public"],
)

# Enable with --@rules_swiftnav//:cxx_standard=23
# Enable with --@rules_swiftnav//cc:cxx_standard=23
config_setting(
name = "cxx23",
flag_values = {":cxx_standard": "23"},
Expand Down
4 changes: 2 additions & 2 deletions cc/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def _common_cxx_opts(exceptions = False, rtti = False, standard = None):
def _construct_local_includes(local_includes):
return [construct_local_include(path) for path in local_includes]

def _link_static(linkstatic = False):
def _link_static(linkstatic = True):
return select({
Label("//cc:_enable_shared"): True,
Label("//cc:_enable_shared"): False,
"//conditions:default": linkstatic,
})

Expand Down

0 comments on commit 729f164

Please sign in to comment.