-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
third_party: Add Abseil C++ build support
This CL adds the GN files needed to build Abseil C++. These files were generated by //pw_build/py/pw_build/generate_3p_gn.py Change-Id: Id58040c22ac64a305585297be4ebf2e256a264ef Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/135957 Commit-Queue: Aaron Green <[email protected]> Reviewed-by: Rob Mohr <[email protected]> Reviewed-by: Taylor Cramer <[email protected]>
- Loading branch information
1 parent
34e5a1b
commit 1875778
Showing
35 changed files
with
4,448 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright 2023 The Pigweed Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy of | ||
# the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations under | ||
# the License. | ||
"""Install and check status of Abseil C++.""" | ||
|
||
import pathlib | ||
from typing import Sequence | ||
|
||
import pw_package.git_repo | ||
import pw_package.package_manager | ||
|
||
|
||
class AbseilCPP(pw_package.git_repo.GitRepo): | ||
"""Install and check status of Abseil C++.""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
super().__init__( | ||
*args, | ||
name='abseil-cpp', | ||
url=( | ||
'https://pigweed.googlesource.com/' | ||
'third_party/github/abseil/abseil-cpp' | ||
), | ||
commit='65109ecdf01a829bdb5e428174b3abb181e75826', | ||
**kwargs, | ||
) | ||
|
||
def info(self, path: pathlib.Path) -> Sequence[str]: | ||
return ( | ||
f'{self.name} installed in: {path}', | ||
"Enable by running 'gn args out' and adding this line:", | ||
f' dir_pw_third_party_abseil_cpp = "{path}"', | ||
) | ||
|
||
|
||
pw_package.package_manager.register(AbseilCPP) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright 2023 The Pigweed Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy of | ||
# the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations under | ||
# the License. | ||
|
||
# DO NOT MANUALLY EDIT! | ||
# This file was automatically generated by pw_build/gn_writer.py | ||
|
||
import("//build_overrides/pigweed.gni") | ||
|
||
import("$dir_pw_build/target_types.gni") | ||
import("$dir_pw_docgen/docs.gni") | ||
import("$dir_pw_third_party/abseil-cpp/abseil-cpp.gni") | ||
|
||
config("abseil_cpp_public_config1") { | ||
include_dirs = [ "$dir_pw_third_party_abseil_cpp" ] | ||
} | ||
|
||
config("abseil_cpp_config1") { | ||
cflags = [ | ||
"-DNOMINMAX", | ||
"-Wall", | ||
"-Wcast-qual", | ||
"-Wconversion-null", | ||
"-Wextra", | ||
"-Wformat-security", | ||
"-Wmissing-declarations", | ||
"-Woverlength-strings", | ||
"-Wpointer-arith", | ||
"-Wundef", | ||
"-Wunused-local-typedefs", | ||
"-Wunused-result", | ||
"-Wvarargs", | ||
"-Wvla", | ||
"-Wwrite-strings", | ||
] | ||
} | ||
|
||
config("abseil_cpp_config2") { | ||
ldflags = [ "-pthread" ] | ||
} | ||
|
||
pw_doc_group("docs") { | ||
sources = [ "docs.rst" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2023 The Pigweed Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy of | ||
# the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations under | ||
# the License. | ||
|
||
# DO NOT MANUALLY EDIT! | ||
# This file was automatically generated by pw_build/gn_writer.py | ||
|
||
declare_args() { | ||
# If compiling tests with Abseil C++, this variable is set to the path to the | ||
# Abseil C++ installation. When set, a pw_source_set for the Abseil C++ library | ||
# is created at "$dir_pw_third_party/abseil-cpp". | ||
dir_pw_third_party_abseil_cpp = "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Copyright 2023 The Pigweed Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy of | ||
# the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations under | ||
# the License. | ||
|
||
# DO NOT MANUALLY EDIT! | ||
# This file was automatically generated by pw_build/gn_writer.py | ||
# It contains GN build targets for absl/algorithm. | ||
|
||
import("//build_overrides/pigweed.gni") | ||
|
||
import("$dir_pw_build/target_types.gni") | ||
import("$dir_pw_third_party/abseil-cpp/abseil-cpp.gni") | ||
|
||
# Generated from //absl/algorithm:algorithm | ||
pw_source_set("algorithm") { | ||
public = [ "$dir_pw_third_party_abseil_cpp/absl/algorithm/algorithm.h" ] | ||
public_configs = [ "../..:abseil_cpp_public_config1" ] | ||
configs = [ | ||
"../../configs:internal_disabled_warnings", | ||
"../..:abseil_cpp_config1", | ||
] | ||
remove_configs = [ "$dir_pw_fuzzer:instrumentation" ] | ||
public_deps = [ "../base:config" ] | ||
} | ||
|
||
# Generated from //absl/algorithm:container | ||
pw_source_set("container") { | ||
public = [ "$dir_pw_third_party_abseil_cpp/absl/algorithm/container.h" ] | ||
public_configs = [ "../..:abseil_cpp_public_config1" ] | ||
configs = [ | ||
"../../configs:internal_disabled_warnings", | ||
"../..:abseil_cpp_config1", | ||
] | ||
remove_configs = [ "$dir_pw_fuzzer:instrumentation" ] | ||
public_deps = [ | ||
":algorithm", | ||
"../base:core_headers", | ||
"../meta:type_traits", | ||
] | ||
} |
Oops, something went wrong.