Skip to content

Commit

Permalink
review: force -O1 in fastbuild.
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
  • Loading branch information
PiotrSikora committed Dec 16, 2021
1 parent 590d817 commit 71a803e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions bazel/external/wee8.patch
Original file line number Diff line number Diff line change
Expand Up @@ -352,22 +352,24 @@

--- bazel/defs.bzl
+++ bazel/defs.bzl
@@ -92,6 +92,7 @@
@@ -90,8 +90,10 @@
deps = [":define_flags"],
copts = [
"-fPIC",
+ "-fno-strict-aliasing",
"-Werror",
"-Wextra",
+ "-Wno-unknown-warning-option",
"-Wno-bitwise-instead-of-logical",
"-Wno-builtin-assume-aligned-alignment",
"-Wno-unused-parameter",
@@ -100,12 +101,33 @@
@@ -100,12 +102,32 @@
"-Wno-non-virtual-dtor",
"-std=c++17",
"-isystem .",
- ],
+ ] + select({
+ "@envoy//bazel:gcc_build": [
+ "-fno-strict-aliasing",
+ "-Wno-extra",
+ "-Wno-int-in-bool-context",
+ "-Wno-class-memaccess",
Expand All @@ -381,11 +383,11 @@
+ # Use GNU dialect, because GCC doesn't allow using
+ # ##__VA_ARGS__ when in standards-conforming mode.
+ "-std=gnu++17",
+ # "always_inline" fails without optimizations, use
+ # -O2 that matches Bazel's --compilation_mode opt.
+ "-O2",
+ ],
+ "//conditions:default": [],
+ }) + select({
+ "@envoy//bazel:fastbuild_build": ["-O1"],
+ "//conditions:default": [],
+ }),
includes = ["include"],
linkopts = [
Expand Down

0 comments on commit 71a803e

Please sign in to comment.