Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel: similar build flags to cmake for corresponding build types (#4… #720

Merged
merged 10 commits into from
Apr 17, 2017

Commits on Apr 7, 2017

  1. bazel: similar build flags to cmake for corresponding build types (en…

    …voyproxy#415).
    
    Bazel has 3 compilation modes out-of-the-box {fastbuild, opt, dbg}, see
    https://bazel.build/versions/master/docs/bazel-user-manual.html#flag--compilation_mode.
    
    The cmake build flags for normal/debug/server_only/asan/coverage are at
    envoyproxy#415 (comment).
    
    Below are the relevant flags (ignoring -include etc.) from the various builds. Lines that begin with
    * are those that include additional flags we're injecting.
    
    fastbuild:
    
     -U_FORTIFY_SOURCE -fstack-protector -Wall
     -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x'
     -frandom-seed=...
     -fPIC
    *-DBAZEL_BRINGUP -Wall -Wextra -Werror -Wnon-virtual-dtor -Woverloaded-virtual
    *-Wold-style-cast '-std=c++0x' -includeprecompiled/precompiled.h -DDEBUG
     -fno-canonical-system-headers
     -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"'
     '-D__TIME__="redacted"'
    
    dbg:
    
     -U_FORTIFY_SOURCE -fstack-protector -Wall
     -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g '-std=c++0x'
     -frandom-seed=...
     -fPIC
    *-DBAZEL_BRINGUP -Wall -Wextra -Werror -Wnon-virtual-dtor
    *-Woverloaded-virtual -Wold-style-cast '-std=c++0x' -includeprecompiled/precompiled.h -ggdb3 -DDEBUG
     -fno-canonical-system-headers
     -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"'
     '-D__TIME__="redacted"'
    
    opt:
    
     -U_FORTIFY_SOURCE -fstack-protector -Wall
     -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2
     '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x'
     -frandom-seed=...
    *-DBAZEL_BRINGUP -Wall -Wextra -Werror -Wnon-virtual-dtor
    *-Woverloaded-virtual -Wold-style-cast '-std=c++0x' -includeprecompiled/precompiled.h
     -fno-canonical-system-headers
     -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"'
     '-D__TIME__="redacted"'
    
    This PR requires envoyproxy#716 to merge, since envoyproxy#716 provides some important changes to how the headers are
    exported from the 3rd party deps to allow -Wextra and -Wold-style-cast to work.
    
    I've verified that we now have a 100% static envoy-static build, which ldd tells me is not a dynamic
    binary.
    
    % bazel build -c opt //source/exe:envoy-static.stripped
    Target //source/exe:envoy-static.stripped up-to-date:
      bazel-bin/source/exe/envoy-static.stripped
    
    % ldd bazel-bin/source/exe/envoy-static.stripped
            not a dynamic executable
    
    % ls -lh bazel-bin/source/exe/envoy-static.stripped
     -r-xr-xr-x 1 htuch eng 8.1M Apr  7 15:46 bazel-bin/source/exe/envoy-static.stripped
    htuch committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    7cebb0e View commit details
    Browse the repository at this point in the history
  2. fix_format

    htuch committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    2423d5f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    63a3b1c View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2017

  1. Bump hash for CI image.

    htuch committed Apr 11, 2017
    Configuration menu
    Copy the full SHA
    b55e524 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f47df63 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2017

  1. Configuration menu
    Copy the full SHA
    1a75897 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2017

  1. Configuration menu
    Copy the full SHA
    4969692 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b28d32e View commit details
    Browse the repository at this point in the history
  3. s/strip_include_prefix/includes/g in ci/prebuilt/BUILD to avoid -Wext…

    …ra etc. applying to external dep headers.
    htuch committed Apr 17, 2017
    Configuration menu
    Copy the full SHA
    619dd3c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e4baffe View commit details
    Browse the repository at this point in the history