Commit Graph

29 Commits

Author SHA1 Message Date
Bret McKee
c7656c3ec1 CHECK support for nullptr (fixes #341)
This allows CHECK_NE(foo, nullptr) to compile and produces "nullptr" for the
string representation of nullptr.
2021-04-09 20:10:08 +02:00
Sergiu Deitsch
efc341d768 fixed windows builds 2021-04-08 18:16:42 +02:00
Rodrigo Queiro
1041a221b8 Use generated config.h for Windows.
This unblocks a simplification of the Windows CMake build.
2021-04-06 14:02:21 +02:00
Rodrigo Queiro
30bb9086d2 bazel: use expand_template instead of genrules
This lets us drop the dependency on the preprocessed headers in
src/windows/glog/.

For some reason, this lets Bazel realize we've failed to declare a
dependency on dirent.h, so I added that too.
2021-03-31 16:08:50 +02:00
Sergiu Deitsch
b442ef8070 build: set ac_cv___attribute___printf_4_5 2021-03-30 21:12:09 +02:00
Rodrigo Queiro
d4e8ebab7e Add layering_check to Bazel CI.
This will avoid regressions on #596.
2021-03-02 10:32:06 +01:00
Rodrigo Queiro
0863ad797c bazel: declare headers in top-level rule
Fixes #596.
2021-03-02 10:32:06 +01:00
Rodrigo Queiro
ce50c57b9e Rename BUILD to BUILD.bazel.
This avoids conflicts with build/ on case-insensitive filesystems.

Fixes #606.
2021-03-01 13:23:27 +01:00
Liang Zou
6d14ac3efe Fix the symlink creation bug if using bazel 2021-02-20 17:34:31 +01:00
Phillipp Schoppmann
0a2e5931bd
Fix build for Emscripten (#546)
Add back config_setting for WASM (no HAVE_SYSCALL_H)

Since there is no config_setting for Linux
(https://github.com/bazelbuild/bazel/issues/11107), Linux needs to be
the default case.
2020-05-13 09:36:55 +09:00
Doug Rabson
3ba8976592 fix bazel build for freebsd 2020-03-25 10:17:39 +01:00
Rodrigo Queiro
1b7d541431 Add note about namespace on Win32. 2019-11-27 18:24:27 +01:00
Rodrigo Queiro
95a3655796 Remove unnecessary defines
The only macro referenced by the public headers is GOOGLE_GLOG_DLL_DECL.
This means fewer defines are propagated to rules that depend on glog.
2019-11-27 18:24:27 +01:00
Rodrigo Queiro
c0d2ceade6 Avoid leaking config.h
This uses strip_include_prefix to avoid leaking private headers
(config.h, port.h). This needs a workaround to prevent a "missing
dependency declarations" error.
2019-11-27 18:24:27 +01:00
Luc Bertrand
20919b325e add windows support for bazel bazed build 2019-11-20 14:21:54 +01:00
Luc Bertrand
7f732529da apply buildifier on glog.bzl 2019-11-20 14:21:54 +01:00
Shuhei Takahashi
6ca3d3cf58 Fix stacktrace on bazel build. (#347)
We need at least following defs to be set to print stacktrace in
failure signal handler.

- HAVE_UNWIND_H: on Linux and macOS. unwind.h is usually present
  by default on those OSes.
- HAVE_DLADDR: on macOS.

Windows is not cared because glog can not be built with bazel
on Windows today.
2019-04-12 10:09:41 +09:00
Prem Nair
e0f7bfc6ca Add kwargs to glog_library 2018-12-31 14:20:45 +00:00
Prem Nair
0bc2d94cd1 Fix bazel build with gflags
The code references `@ac_cv_have_libgflags@` but not `@ac_cv_have_libgflags_h@`. This corrects that.

`int(with_gflags)` incorporates the possibility of `True/False`: https://github.com/bazelbuild/bazel/issues/4792
2018-12-31 14:20:45 +00:00
levosos
367518f650 copts are passed correctly when building w/o gflags
resolves #338
2018-07-09 11:14:33 +02:00
Akiyoshi Ochiai
dd2b93d761 Fix __attribute__((noreturn)) mismatch warning in Bazel build 2018-04-18 10:15:54 +02:00
Rodrigo Queiro
55cc27b6ec Bazel: make example more portable 2018-02-01 14:13:46 +01:00
Rodrigo Queiro
bc9a491033 Allow using glog/stl_logging.h with Bazel
Fixes #289.
2018-02-01 14:13:46 +01:00
Rodrigo Queiro
3106945d8d Add workaround for Bazel build on macOS
This works around https://github.com/bazelbuild/bazel/issues/3979,
and so closes #282.
2018-01-16 17:06:15 +01:00
Rodrigo Queiro
3efe9e4025 Add an example using glog from Bazel 2018-01-04 11:35:53 +01:00
Rodrigo Queiro
2a593235ba Update gflags to latest master
This means that gflags no longer leaks config.h, so I had to fix a bug
in glog.bzl where config.h is generated at the wrong path.

I also switched to the best-practice for depending on git repositories,
ie using http_archive with a mirror.
2017-12-19 15:50:12 +01:00
Zhongming Qu
ea458f60b9 Remove an empty textual_hdrs field. 2017-12-14 01:03:19 -08:00
Zhongming Qu
e6e2e1372a Hide certain header files from the cc_library().
This commit addresses a few issues:

    1.  No longer leak config.h in a way similar to
            https://github.com/gflags/gflags/issues/233
        The solution of prefixing the path by 'glog_internal' is modified from
            https://github.com/gflags/gflags/issues/234

    2.  No longer expose internal headers.

    3.  Replace PACKAGE_NAME with native.package_name()

    4.  Uers can choose namespaces via the newly added 'namespace' keyword.

    5.  Replace glob with explicitly listing of files.

    6.  Make the genrules more compact using pythonic list construction.
2017-12-14 00:58:33 -08:00
Zhongming Qu
921651e97c Build with Bazel. 2017-12-14 00:58:33 -08:00