diff options
author | Deanna Garcia <deannagarcia@google.com> | 2022-09-14 17:53:54 +0000 |
---|---|---|
committer | Deanna Garcia <deannagarcia@google.com> | 2022-09-14 17:53:54 +0000 |
commit | 9aa5a06f7f7449b654fc411ad736815512b6d2d1 (patch) | |
tree | 387b1cf97a9bf8c146e970c5f203d4d6daffee52 | |
parent | 4e8237e15e5abf6bf0eee423d6ac6fcb707caa19 (diff) | |
download | protobuf-9aa5a06f7f7449b654fc411ad736815512b6d2d1.tar.gz |
Add back file
-rw-r--r-- | compiler_config_setting.bzl | 23 | ||||
-rw-r--r-- | composer.json | 4 |
2 files changed, 25 insertions, 2 deletions
diff --git a/compiler_config_setting.bzl b/compiler_config_setting.bzl new file mode 100644 index 000000000..f4d1f7b9e --- /dev/null +++ b/compiler_config_setting.bzl @@ -0,0 +1,23 @@ +"""Creates config_setting that allows selecting based on 'compiler' value.""" + +def create_compiler_config_setting(name, value, visibility = None): + # The "do_not_use_tools_cpp_compiler_present" attribute exists to + # distinguish between older versions of Bazel that do not support + # "@bazel_tools//tools/cpp:compiler" flag_value, and newer ones that do. + # In the future, the only way to select on the compiler will be through + # flag_values{"@bazel_tools//tools/cpp:compiler"} and the else branch can + # be removed. + if hasattr(cc_common, "do_not_use_tools_cpp_compiler_present"): + native.config_setting( + name = name, + flag_values = { + "@bazel_tools//tools/cpp:compiler": value, + }, + visibility = visibility, + ) + else: + native.config_setting( + name = name, + values = {"compiler": value}, + visibility = visibility, + ) diff --git a/composer.json b/composer.json index 2c64ad220..69a3297dd 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ }, "autoload": { "psr-4": { - "Google\\Protobuf\\": "php/src/Google/Protobuf", - "GPBMetadata\\Google\\Protobuf\\": "php/src/GPBMetadata/Google/Protobuf" + "Google\\Protobuf\\": "src/Google/Protobuf", + "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf" } } } |