* ruby: use squiggly heredoc for rake-compiler-dock commands
* ruby: use `bundler exec` when building native gems
* ruby: clean .{bundle,so} from src/ruby/lib when building native gems
Failing to remove these files between native builds leads
rake-compiler to establish circular dependencies (which may be a bug
in rake-compiler, but this feels like an easy and good thing to do,
anyway).
* ruby: extract linux and darwin RUBY_PLATFORM checks into variables
There were already "windows" and "bsd" flags, so let's improve
consistency and readability, and set a clear pattern for subsequent
flags.
* ruby: rely on rake-compiler-dock v1.1.0 to set no_native correctly
As of v1.1.0 there's no need to set this explicitly anymore; it will
be true whenever the extension is being built in a RCD container.
See https://github.com/rake-compiler/rake-compiler-dock/commit/362890d
* ruby: add "x86_64-darwin" platform gem
Using RCD for this platform unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in #25060.
Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.
Related to:
- #25429
- #25756
* Upgrade libuv to v1.42.0
Also eliminates some cruft from the node implementation from 5 years ago
* sanitize.sh added a blank line?? ok then.
* pin to libuv v1.37.0
Fix regression introduced by previous commit. Original problem that
commit was trying to fix was solved by modification of grpc recipe in
meta-openembedded project repository
Fixes#26857
Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
* 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
This enforces entire script to exit with error if any of the
pre-install command fails. The error exit marks the pod install
as failure and therefore prompting user's immediate attention.
Previoulsy pre-install script might siliently fail partially and
left corrupted cocoapod cahce which causes a number of build issues
during version upgrade
* Add isort_code.sh to sanity tests
* Run tools/distrib/isort_code.sh
* Fine tune the import order for relative imports
* Make pylint and project generation happy
* Fix a few corner cases
* Use --check instead of --diff
* The import order impacts test result somehow
* Make isort print diff and check output at the same time
* Let tools/run_tests/python_utils be firstparty library
* Run isort against latest HEAD
* cmake: fix cross-compilation with gRPC_BUILD_GRPC_CPP_PLUGIN=OFF
When cross-compiling gRPC, a _native_ version of 'grpc_cpp_plugin' is
searched in the environment. For most use cases, a _cross_ version of this
file is not needed and gRPC_BUILD_GRPC_CPP_PLUGIN can be set to OFF.
However, when cross-building with -DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF, there
are some build errors, for example:
make[3]: *** No rule to make target 'grpc_cpp_plugin', needed by 'gens/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc'. Stop.
This is because there is still a hard dependency on 'grpc_cpp_plugin' for
these targets, not taking into account the cross-compilation case.
Fix by depending on the variable gRPC_CPP_PLUGIN, which is set correctly for
either cross or native case.
* regenerate projects
This code adds an iomgr implementation that's backed by an EventEngine. This uses the EventEngine API alone, and separate work will introduce an EventEngine prototype to plug into it.
See also drfloob#1: @nicolasnoble has a pull request against this branch, implementing the libuv-based EventEngine. One goal here is to implement the iomgr code such that it can be merged independently without affecting normal builds.
This implementation can be built using bazel build --cxxopt='-DGRPC_USE_EVENT_ENGINE' :all
Some shortcuts are being taken to get a working, testable version of the engine. EventEngines are not pluggable, for example.
* Add cpp macro to append wrapped language info to xDS user agent
* Add Python xDS user agent
* fix redefinition error and add macro for wrapped lang version
* clang-format
* Revert xds_api.cc changes
* Use two separate macros
* Yapf
* Regenerate projects
* Include _metadata.py in source distributions
* Attempt to fix quote escaping on Windows
Co-authored-by: Mark D. Roth <roth@google.com>
* cmake: don't install plugins when crosscompiling
Plugins should not be installed for a cross-compilation environment,
because it has to run on a host/build system. If it's installed then
configure stage fails with an error, that imported target references
non-existing file. Even if the file is found, it can't be used on a host.
Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
* better way of detecting protoc targets
Co-authored-by: Jan Tattermusch <jtattermusch@google.com>