Skip to content

Commit

Permalink
Drop ABSL_RANDOM_HWAES_FLAGS compiler flags
Browse files Browse the repository at this point in the history
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
(#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: #27095

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 #27095
  • Loading branch information
stanhu committed Aug 25, 2021
1 parent 6a06f0c commit fd36a5d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build_handwritten.yaml
Expand Up @@ -165,7 +165,7 @@ configs:
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt
defaults:
abseil:
CPPFLAGS: -g $(ABSL_RANDOM_HWAES_FLAGS) -Ithird_party/abseil-cpp
CPPFLAGS: -Ithird_party/abseil-cpp
ares:
CFLAGS: -g
CPPFLAGS: -Ithird_party/cares -Ithird_party/cares/cares -fvisibility=hidden -D_GNU_SOURCE
Expand Down
5 changes: 0 additions & 5 deletions templates/Makefile.template
Expand Up @@ -441,11 +441,6 @@

GRPC_ABSEIL_DEP = $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a
GRPC_ABSEIL_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a
ifeq ($(HOST_IS_X86_64),true)
ABSL_RANDOM_HWAES_FLAGS = -maes -msse4
else
ABSL_RANDOM_HWAES_FLAGS =
endif

# Setup re2 dependency

Expand Down

0 comments on commit fd36a5d

Please sign in to comment.