Commit Graph

410 Commits

Author SHA1 Message Date
Matthew Stevenson 51bccbdcf9 [ssl] Support Windows system roots. (#34874)
This PR is copied from #34276, since I did not have permissions to add commits to it. That PR has been verified to work (see the top-level description). This PR just makes the gRPC tests pass (e.g. adding includes, clang formatting).

Closes #34874

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/34874 from matthewstevenson88:pull_34276 d5fb73e5b2
PiperOrigin-RevId: 609107146
2024-02-21 13:40:46 -08:00
Jan Tattermusch 3a2bd221ef
[cmake] Cleanup and simplify the cmake build. (#34087)
Followup for https://github.com/grpc/grpc/pull/33803

More cmake cleanup. See commit descriptions for individual cleanup
items.
2023-08-17 20:26:40 +02:00
Jan Tattermusch a8508ec465
[build metadata] Bazel to "other build systems" improvements (#33803)
- Extract build metadata for some external dependencies from bazel
build. This is achieved by letting extract_metadata_from_bazel_xml.py
analyze some external libraries and sources. The logic is basically the
same as for internal libraries, I only needed to teach
extract_metadata_from_bazel_xml.py which external libraries it is
allowed to analyze.
* currently, the list of source files is automatically determined for
`z`, `upb`, `re2` and `gtest` dependencies (at least for the case where
we're building in "embedded" mode - e.g. mostly native extensions for
python, php, ruby etc. - cmake has the ability to replace some of these
dependencies by actual cmake dependency.)
- Eliminate the need for manually written gen_build_yaml.py for some
dependencies.
- Make the info on target dependencies in build_autogenerated.yaml more
accurate and complete. Until now, there were some depdendencies that
were allowed to show up in build_autogenerated.yaml and some that were
being skipped. This made generating the CMakeLists.txt and Makefile
quite confusing (since some dependencies are being explicitly mentioned
and some had to be assumed by the build system).
- Overhaul the Makefile
* the Makefile is currently only used internally (e.g. for ruby and PHP
builds)
* until now, the makefile wasn't really using the info about which
targets depend on what libraries, but it was effectively hardcoding the
depedendency data (by magically "knowing" what is the list of all the
stuff that e.g. "grpc" depends on).
* After the overhaul, the Makefile.template now actually looks at the
library dependencies and uses them when generating the makefile. This
gives a more correct and easier to maintain makefile.
* since csharp is no longer on the master branch, remove all mentions of
"csharp" targets in the Makefile.

Other notable changes:
- make extract_metadata_from_bazel_xml.py capable of resolving workspace
bind() rules (so that it knows the real name of the target that is
referred to as e.g. `//external:xyz`)

TODO:
- [DONE] ~~pkgconfig C++ distribtest~~
- [DONE} ~~update third_party/README to reflect changes in how some deps
get updated now.~~


Planned followups:
- cleanup naming of some targets in build metadata and buildsystem
templates: libssl vs boringssl, ares vs cares etc.
- further cleanup of Makefile
- further cleanup of CMakeLists.txt
- remote the need from manually hardcoding extra metadata for targets in
build_autogenerated.yaml. Either add logic that determines the
properties of targets automatically, or use metadata from bazel BUILD.
2023-08-16 19:13:39 +02:00
apolcyn 017786f151
[c-ares] Upgrade c-ares dependency to 1.19.1 (#33392)
WIP
2023-06-12 13:38:20 -07:00
mojh7 fe3f400985
[typo] Fix typo: configutation -> configuration (#33072)
configutation -> configuration
2023-05-17 14:09:34 -07:00
CZRZ 90f4f33536
Remove unnecessary gflags related comments in makefile (#28846)
Signed-off-by: chengzrz <czrzrichard@gmail.com>

Signed-off-by: chengzrz <czrzrichard@gmail.com>
2022-09-20 16:04:12 -07:00
Craig Tiller 004788af3d
[cleanup] Remove profiling timers (#30779)
* [cleanup] Remove profiling timers

- nobody has used this system in years
- if we needed it, we'd probably rewrite it at this point to be something more modern
- let's remove it until that need arises

* fix

* fixes
2022-08-30 13:40:08 -07:00
Benoit Daloze 0a5d9828c1
Make the gem build on TruffleRuby (#27660)
* replace darwin checks in extconf.rb to exclude TruffleRuby

* inherit RANLIB and STRIP from RbConfig, set LDXX

* enable overriding ranlib command in top-level makefile

* ensure the -no_warning_for_no_symbols flag is only used with Apple's ranlib

* don't embed openssl & zlib on truffleruby

* add RbConfig's cppflag to CPPFLAGS when using TruffleRuby

* this ensure the paths to find the system's OpenSSL are set up correctly with TruffleRuby (includes being able to find an OpenSSL installed via Homebrew etc)

* don't statically link standard libraries on Linux with Truffleruby

* This does not work when compiling to bitcode.

* Prefer SIGTERM to SIGQUIT for graceful shutdown in examples

* Overriding SIGQUIT is suboptimal, for example on JVM where it is very
  useful to dump the thread stacktraces.

* Keep the rb_tr_abi_version symbol for TruffleRuby in grpc_c.so

* Otherwise TruffleRuby cannot verify the ABI version is correct.
* See https://github.com/oracle/truffleruby/issues/2386

* Use RbConfig::CONFIG['STRIP'] instead of just `strip`

* Use a local variable for apple_toolchain for consistency

* Add a comment about -static-libgcc -static-libstdc++ and TruffleRuby

* Split comment into two for openssl/zlib

Co-authored-by: Nicolas Laurent <nicolas.laurent@oracle.com>
2022-06-27 23:12:13 -07:00
Esun Kim ec58a346f9
Changed C99 to C11 (#29687)
* Changed C99 to C11

* Remove gnu99 option

* Switch to gnu11 for xcode
2022-05-20 14:03:04 -07:00
Esun Kim 03e9ac6f1f
Requiring C++14 (#29589) 2022-05-12 21:17:32 -07:00
apolcyn 9f1663fb74
Upgrade c-ares to 1.17.2 (#28671)
Upgrade c-ares dependency to 1.17.2
2022-01-25 10:41:18 -08:00
Esun Kim 260145c517
Updated backoff to use absl::Random (#27193)
* Replace in-house rand with absl::Random for backoff (#26463)

* Replace in-house rand with absl::Random for backoff

* Run sanity

* Added bscrypt dependency

* Removed ABSL_RANDOM_HWAES_FLAGS

* Remove GCC_WARN_64_TO_32_BIT_CONVERSION = YES

* GCC_WARN_64_TO_32_BIT_CONVERSION to podspec install
2021-12-02 15:22:44 -08:00
Stan Hu 106dd2fed8
Drop -msse4 compiler flag (#27121)
* Drop ABSL_RANDOM_HWAES_FLAGS compiler flags

Older CPUs that do not have SSE4.1 would crash with the Ruby native gem
due to an illegal instruction exception.

The Abseil random library isn't being used at the moment
(https://github.com/grpc/grpc/pull/26476), and there's no reason gRPC
needs to force SSE4.1 instructions on all platforms at the moment. There
are other hardware-specific issues that need to be ironed out for this
to work: https://github.com/grpc/grpc/pull/26479

When the `-msse4` compiler flag was enabled, the Abseil code started
using the `pinsrb` instruction:

```
$ elfx86exts abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.o
MODE64 (ret)
CMOV (cmovne)
SSE2 (movdqa)
SSE41 (pinsrb)
SSE1 (movaps)
CPU Generation: Penryn
```

Closes https://github.com/grpc/grpc/issues/27095

* Revert "Drop ABSL_RANDOM_HWAES_FLAGS compiler flags"

This reverts commit 3b7cc74d39.

* Drop -msse4 compiler flag

Older CPUs that do not have SSE4.1 would crash with the Ruby native gem
due to an illegal instruction exception.

The Abseil random library isn't being used at the moment
(https://github.com/grpc/grpc/pull/26476), and there's no reason gRPC
needs to force SSE4.1 instructions on all platforms at the moment. There
are other hardware-specific issues that need to be ironed out for this
to work: https://github.com/grpc/grpc/pull/26479

When the `-msse4` compiler flag was enabled, the Abseil code started
using the `pinsrb` instruction:

```
$ elfx86exts abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.o
MODE64 (ret)
CMOV (cmovne)
SSE2 (movdqa)
SSE41 (pinsrb)
SSE1 (movaps)
CPU Generation: Penryn
```

This was previously needed because gcc 4.8 wouldn't compile without the
`-msse4` and `-maes` flags.

However, per
97db2bf7fb
gcc 5.0+ automatically detects whether these options are enabled.

clang still needs `-maes` since including `wmmintrin.h` expects the AES
option to be enabled.

Closes https://github.com/grpc/grpc/issues/27095
2021-10-05 12:35:04 +02:00
Jan Tattermusch 451127740d
Revert "Replace in-house rand with absl::Random for backoff (#26463)" (#26476)
This reverts commit b5191d0930.
2021-06-14 21:56:35 -07:00
Esun Kim b5191d0930
Replace in-house rand with absl::Random for backoff (#26463)
* Replace in-house rand with absl::Random for backoff

* Run sanity

* Added bscrypt dependency
2021-06-11 16:29:45 -07:00
Jan Tattermusch a2697e4592
simplify build.yaml: get rid of the "secure" field (#25547)
* get rid of useless "secure" field from build.yaml

* remove nonsensical "liblibssl.a" dependency from makefile

* regenerate projects
2021-03-04 15:07:24 +01:00
Jan Tattermusch 0c66144692
Simplify build.yaml's "deps_linkage" logic (#25521)
* regenerate to fix sanity

* makefile template always assumes deps_linkage=static

* stop setting no-longer-used deps_linkage field in build_autogenerated.yaml

* regenerate projects
2021-02-22 19:58:09 +01:00
Jan Tattermusch cbf97fa716 Makefile: remove support for building protobuf, C++ libraries and executables 2020-12-09 11:52:13 +01:00
capstan 7267c8fcd9 Python3-ize tools/buildgen.
* Ran `2to3` on `tools/buildgen` and the `gen_build_yaml.py` files.
* Updated the invocations of python to be explicitly Python 3.
* Changed the loader in `mako_renderer.py` to allow pickle to find the module for pickling `external_version.Version`
* Added a few open-as-binary to placate readers/writers expecting bytes.
* Hand tweaked the templates to remove `iteritems` and fiddle with encodings.

Partially addresses #24359.
2020-11-04 01:18:57 +01:00
Jan Tattermusch 7388266aa7 simplify the way dependencies are included in Makefile 2020-08-28 08:19:01 -04:00
Jan Tattermusch e9bcf7eb51 make: GTEST_LIB no longer useful 2020-08-28 08:19:01 -04:00
Esun Kim bf87ec9e44 Add ABSL_RANDOM_HWAES_FLAGS 2020-08-19 18:17:39 -07:00
Jan Tattermusch 91e6860867 generate region markers to ease reading Makefile 2020-08-17 09:50:26 +02:00
Jan Tattermusch 0f246b931e remove some unneeded Makefile targets 2020-08-17 09:50:26 +02:00
Jan Tattermusch 6d0edef877 get rid of .pc config file generation in Makefile 2020-08-17 09:50:26 +02:00
Jan Tattermusch ed73e5cf0c Makefile: add libs and targets filtering 2020-08-17 09:50:26 +02:00
Jan Tattermusch 4a65f0c9dd remove rpath trick 2020-07-15 08:56:45 +02:00
Jan Tattermusch 7247f7efe6 Makefile: stop supporting make install 2020-07-15 08:56:45 +02:00
Donna Dionne 8dd0cb4712 Add support for xDS regex matchers. 2020-07-07 13:17:25 -07:00
Esun Kim 0a81964e72
Merge pull request #23357 from veblush/absl-cppflags
Add abseil compiler options
2020-07-01 09:50:30 -07:00
Esun Kim cdc442876b Add abseil compiler options 2020-06-29 23:03:26 -07:00
Esun Kim 34027f60fc Refactored AR in makefile 2020-06-29 22:51:31 -07:00
Stanley Cheung e5098227aa Main Makefile should require protobuf 3.12+ now 2020-06-26 00:03:49 -07:00
Esun Kim de9feb69ab Add dbghelp.lib to windows artifacts 2020-02-16 18:27:22 -08:00
Jan Tattermusch 7d90fa8891 fix typo in Makefile abseil dependency 2020-02-13 12:46:22 +01:00
Jan Tattermusch a19cb24e94 set abseil library as secure=false 2020-02-13 12:46:22 +01:00
Jan Tattermusch f098606c4a Revert "Revert "Reintroduce #21527 (boringssl submodule unification)""
This reverts commit cca892022b.
2020-01-29 09:18:51 -05:00
hcaseyal cca892022b
Revert "Reintroduce #21527 (boringssl submodule unification)" 2020-01-27 13:46:10 -08:00
Jan Tattermusch e7e5d0198f Revert "Revert "Unify boringssl submodules and use non-developer boringssl cmake build""
This reverts commit fe2242e603.
2020-01-27 05:04:05 -05:00
Jan Tattermusch fe2242e603
Revert "Unify boringssl submodules and use non-developer boringssl cmake build" 2020-01-20 14:27:31 +01:00
Jan Tattermusch 742c61294b use boringssl-with-bazel instead of third_party/boringssl 2020-01-16 03:53:03 -05:00
Jan Tattermusch 891537eae1 get rid of unused use_openssl.sh script 2020-01-08 13:15:40 +01:00
Esun Kim 5207eba9ff Add abseil 2020-01-03 19:29:55 -08:00
Esun Kim aaf48c66fc Change upb from filegroup to library 2019-11-05 14:20:56 -08:00
Zack Galbreath d249dc9cf3 Update Makefile rules for .pc file creation
Change "Requires.private" to "Requires" so pkg-config can better provide gRPC's
dependencies.
2019-10-09 12:42:21 -04:00
tanjunchen 64cdea5a07 fix some spelling mistakes in document 2019-10-04 09:07:35 +08:00
Esun Kim 49b9fb2b3c Enable C++ standard library 2019-09-03 09:27:54 -07:00
Hope Casey-Allen f66f047841 Update googletest version to fix BoringSSL support 2019-08-22 12:42:18 -07:00
Nicolas Noble 5877f2e56b Fixing gcc8's no-unknown-warning-option issue.
Before gcc8, it was ignoring any unknown -Wno-* command, leaving clang's
-Wno-unknown-warning-option to mix. That's no longer the case.
2019-08-20 10:55:12 -07:00
Esun Kim f88bd06ee5 Go UPB! 2019-08-06 15:27:14 -07:00