Compare commits
1 Commits
master
...
ci-macos-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a742057f9 |
@ -2,6 +2,7 @@
|
|||||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-*,modernize-*,-modernize-use-trailing-return-type,readability-*,portability-*,performance-*,bugprone-*,android-*,darwin-*,clang-analyzer-*'
|
Checks: 'clang-diagnostic-*,clang-analyzer-*,google-*,modernize-*,-modernize-use-trailing-return-type,readability-*,portability-*,performance-*,bugprone-*,android-*,darwin-*,clang-analyzer-*'
|
||||||
WarningsAsErrors: ''
|
WarningsAsErrors: ''
|
||||||
HeaderFilterRegex: ''
|
HeaderFilterRegex: ''
|
||||||
|
AnalyzeTemporaryDtors: false
|
||||||
FormatStyle: file
|
FormatStyle: file
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
- key: cert-dcl16-c.NewSuffixes
|
- key: cert-dcl16-c.NewSuffixes
|
||||||
|
|||||||
32
.github/workflows/linux.yml
vendored
32
.github/workflows/linux.yml
vendored
@ -31,20 +31,42 @@ jobs:
|
|||||||
- name: Setup Dependencies
|
- name: Setup Dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-suggests --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y \
|
||||||
g++ \
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
gcovr \
|
gcovr \
|
||||||
libgflags-dev \
|
libgflags-dev \
|
||||||
libgmock-dev \
|
|
||||||
libgtest-dev \
|
|
||||||
libunwind-dev \
|
libunwind-dev \
|
||||||
ninja-build
|
ninja-build
|
||||||
|
|
||||||
|
- name: Cache GTest
|
||||||
|
id: cache-gtest
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: gtest/
|
||||||
|
key: ${{runner.os}}-gtest-1.11
|
||||||
|
|
||||||
|
- name: Download GTest
|
||||||
|
if: steps.cache-gtest.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
wget https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz
|
||||||
|
tar xvf release-1.11.0.tar.gz
|
||||||
|
|
||||||
|
- name: Build GTest
|
||||||
|
if: steps.cache-gtest.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cmake -S googletest-release-1.11.0 -B build-googletest \
|
||||||
|
-DBUILD_SHARED_LIBS=${{matrix.shared}} \
|
||||||
|
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/gtest \
|
||||||
|
-G Ninja
|
||||||
|
cmake --build build-googletest --target install
|
||||||
|
|
||||||
- name: Setup Environment
|
- name: Setup Environment
|
||||||
if: matrix.build_type == 'Debug'
|
if: matrix.build_type == 'Debug'
|
||||||
run: |
|
run: |
|
||||||
echo 'CXXFLAGS=--coverage' >> $GITHUB_ENV
|
echo 'CXXFLAGS=--coverage' >> $GITHUB_ENV
|
||||||
|
echo 'GTest_ROOT=${{github.workspace}}/gtest' >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
env:
|
env:
|
||||||
@ -109,7 +131,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload Coverage to Codecov
|
- name: Upload Coverage to Codecov
|
||||||
if: matrix.build_type == 'Debug'
|
if: matrix.build_type == 'Debug'
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
files: build_${{matrix.build_type}}/coverage.xml
|
files: build_${{matrix.build_type}}/coverage.xml
|
||||||
|
|||||||
4
.github/workflows/macos.yml
vendored
4
.github/workflows/macos.yml
vendored
@ -5,7 +5,7 @@ on: [push, pull_request]
|
|||||||
jobs:
|
jobs:
|
||||||
build-macos:
|
build-macos:
|
||||||
name: AppleClang-C++${{matrix.std}}-${{matrix.build_type}}
|
name: AppleClang-C++${{matrix.std}}-${{matrix.build_type}}
|
||||||
runs-on: macos-12
|
runs-on: macos-14
|
||||||
permissions:
|
permissions:
|
||||||
actions: read
|
actions: read
|
||||||
contents: read
|
contents: read
|
||||||
@ -68,7 +68,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload Coverage to Codecov
|
- name: Upload Coverage to Codecov
|
||||||
if: matrix.build_type == 'Debug'
|
if: matrix.build_type == 'Debug'
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
files: build_${{matrix.build_type}}/coverage.xml
|
files: build_${{matrix.build_type}}/coverage.xml
|
||||||
|
|||||||
10
.github/workflows/windows.yml
vendored
10
.github/workflows/windows.yml
vendored
@ -45,18 +45,18 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: gtest/
|
path: gtest/
|
||||||
key: ${{runner.os}}-gtest-1.14-${{matrix.lib}}-${{matrix.arch}}-${{matrix.build_type}}
|
key: ${{runner.os}}-gtest-1.11-${{matrix.lib}}-${{matrix.arch}}-${{matrix.build_type}}
|
||||||
|
|
||||||
- name: Download GTest
|
- name: Download GTest
|
||||||
if: steps.cache-gtest.outputs.cache-hit != 'true'
|
if: steps.cache-gtest.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
(New-Object System.Net.WebClient).DownloadFile("https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip", "v1.14.0.zip")
|
(New-Object System.Net.WebClient).DownloadFile("https://github.com/google/googletest/archive/refs/tags/release-1.11.0.zip", "release-1.11.0.zip")
|
||||||
Expand-Archive v1.14.0.zip .
|
Expand-Archive release-1.11.0.zip .
|
||||||
|
|
||||||
- name: Build GTest
|
- name: Build GTest
|
||||||
if: steps.cache-gtest.outputs.cache-hit != 'true'
|
if: steps.cache-gtest.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
cmake -S googletest-1.14.0 -B build-googletest `
|
cmake -S googletest-release-1.11.0 -B build-googletest `
|
||||||
-A ${{matrix.arch}} `
|
-A ${{matrix.arch}} `
|
||||||
-DBUILD_SHARED_LIBS=${{matrix.lib == 'shared'}} `
|
-DBUILD_SHARED_LIBS=${{matrix.lib == 'shared'}} `
|
||||||
-Dgtest_force_shared_crt=ON `
|
-Dgtest_force_shared_crt=ON `
|
||||||
@ -234,7 +234,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload Coverage to Codecov
|
- name: Upload Coverage to Codecov
|
||||||
if: matrix.build_type == 'Debug'
|
if: matrix.build_type == 'Debug'
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
files: build_${{matrix.build_type}}/coverage.xml
|
files: build_${{matrix.build_type}}/coverage.xml
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,5 +2,3 @@
|
|||||||
/build*/
|
/build*/
|
||||||
/site/
|
/site/
|
||||||
bazel-*
|
bazel-*
|
||||||
# Bzlmod lockfile
|
|
||||||
/MODULE.bazel.lock
|
|
||||||
|
|||||||
@ -17,6 +17,6 @@ platform(
|
|||||||
constraint_values = [
|
constraint_values = [
|
||||||
"@platforms//cpu:x86_64",
|
"@platforms//cpu:x86_64",
|
||||||
"@platforms//os:windows",
|
"@platforms//os:windows",
|
||||||
"@rules_cc//cc/private/toolchain:clang-cl",
|
"@bazel_tools//tools/cpp:clang-cl",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@ -64,7 +64,7 @@ set (CMAKE_VISIBILITY_INLINES_HIDDEN ON)
|
|||||||
|
|
||||||
set (CMAKE_DEBUG_POSTFIX d)
|
set (CMAKE_DEBUG_POSTFIX d)
|
||||||
|
|
||||||
find_package (GTest 1.11 COMPONENTS GTest OPTIONAL_COMPONENTS GMock NO_MODULE)
|
find_package (GTest NO_MODULE)
|
||||||
|
|
||||||
if (GTest_FOUND)
|
if (GTest_FOUND)
|
||||||
set (HAVE_LIB_GTEST 1)
|
set (HAVE_LIB_GTEST 1)
|
||||||
@ -278,12 +278,12 @@ if (WITH_SYMBOLIZE)
|
|||||||
if (HAVE_SYMBOLIZE)
|
if (HAVE_SYMBOLIZE)
|
||||||
set (HAVE_STACKTRACE 1)
|
set (HAVE_STACKTRACE 1)
|
||||||
endif (HAVE_SYMBOLIZE)
|
endif (HAVE_SYMBOLIZE)
|
||||||
elseif (APPLE AND HAVE_DLADDR)
|
|
||||||
set (HAVE_SYMBOLIZE 1)
|
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
if (HAVE_ELF_H OR HAVE_SYS_EXEC_ELF_H)
|
if (HAVE_ELF_H OR HAVE_SYS_EXEC_ELF_H)
|
||||||
set (HAVE_SYMBOLIZE 1)
|
set (HAVE_SYMBOLIZE 1)
|
||||||
endif (HAVE_ELF_H OR HAVE_SYS_EXEC_ELF_H)
|
endif (HAVE_ELF_H OR HAVE_SYS_EXEC_ELF_H)
|
||||||
|
elseif (APPLE AND HAVE_DLADDR)
|
||||||
|
set (HAVE_SYMBOLIZE 1)
|
||||||
endif (WIN32 OR CYGWIN)
|
endif (WIN32 OR CYGWIN)
|
||||||
endif (WITH_SYMBOLIZE)
|
endif (WITH_SYMBOLIZE)
|
||||||
|
|
||||||
|
|||||||
@ -5,9 +5,3 @@ module(
|
|||||||
|
|
||||||
bazel_dep(name = "gflags", version = "2.2.2")
|
bazel_dep(name = "gflags", version = "2.2.2")
|
||||||
bazel_dep(name = "googletest", version = "1.14.0", dev_dependency = True)
|
bazel_dep(name = "googletest", version = "1.14.0", dev_dependency = True)
|
||||||
bazel_dep(name = "platforms", version = "0.0.10")
|
|
||||||
bazel_dep(name = "rules_cc", version = "0.0.12")
|
|
||||||
|
|
||||||
# Required for Windows clang-cl build: --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows
|
|
||||||
cc_configure = use_extension("@rules_cc//cc:extensions.bzl", "cc_configure_extension")
|
|
||||||
use_repo(cc_configure, "local_config_cc")
|
|
||||||
|
|||||||
@ -91,14 +91,12 @@ def glog_library(with_gflags = 1, **kwargs):
|
|||||||
# Enable declaration of _Unwind_Backtrace
|
# Enable declaration of _Unwind_Backtrace
|
||||||
"-D_GNU_SOURCE",
|
"-D_GNU_SOURCE",
|
||||||
"-DHAVE_LINK_H",
|
"-DHAVE_LINK_H",
|
||||||
"-DHAVE_SYMBOLIZE", # Supported by <link.h>
|
|
||||||
]
|
]
|
||||||
|
|
||||||
linux_only_copts = [
|
linux_only_copts = [
|
||||||
# For utilities.h.
|
# For utilities.h.
|
||||||
"-DHAVE_EXECINFO_H",
|
"-DHAVE_EXECINFO_H",
|
||||||
"-DHAVE_LINK_H",
|
"-DHAVE_LINK_H",
|
||||||
"-DHAVE_SYMBOLIZE", # Supported by <link.h>
|
|
||||||
]
|
]
|
||||||
|
|
||||||
darwin_only_copts = [
|
darwin_only_copts = [
|
||||||
|
|||||||
@ -3,20 +3,27 @@
|
|||||||
## Bazel
|
## Bazel
|
||||||
|
|
||||||
To use glog within a project which uses the [Bazel](https://bazel.build/) build
|
To use glog within a project which uses the [Bazel](https://bazel.build/) build
|
||||||
tool, add the following lines to your `MODULE.bazel` file:
|
tool, add the following lines to your `WORKSPACE` file:
|
||||||
|
|
||||||
``` bazel title="MODULE.bazel"
|
``` bazel title="WORKSPACE"
|
||||||
bazel_dep(name = "glog")
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||||
|
|
||||||
archive_override(
|
http_archive(
|
||||||
module_name = "glog",
|
name = "gflags",
|
||||||
urls = "https://github.com/google/glog/archive/cc0de6c200375b33d907ee7632eee2f173b33a09.tar.gz",
|
sha256 = "34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf",
|
||||||
strip_prefix = "glog-cc0de6c200375b33d907ee7632eee2f173b33a09", # Latest commit as of 2024-06-08.
|
strip_prefix = "gflags-2.2.2",
|
||||||
integrity = "sha256-rUrv4EBkdc+4Wbhfxp+KoRstlj2Iw842/OpLfDq0ivg=",
|
urls = ["https://github.com/gflags/gflags/archive/v2.2.2.tar.gz"],
|
||||||
|
)
|
||||||
|
|
||||||
|
http_archive(
|
||||||
|
name = "com_github_google_glog",
|
||||||
|
sha256 = "c17d85c03ad9630006ef32c7be7c65656aba2e7e2fbfc82226b7e680c771fc88",
|
||||||
|
strip_prefix = "glog-0.7.1",
|
||||||
|
urls = ["https://github.com/google/glog/archive/v0.7.1.zip"],
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then add `@glog//:glog` to
|
You can then add `@com_github_google_glog//:glog` to
|
||||||
the deps section of a `cc_binary` or
|
the deps section of a `cc_binary` or
|
||||||
`cc_library` rule, and `#!cpp #include <glog/logging.h>` to
|
`cc_library` rule, and `#!cpp #include <glog/logging.h>` to
|
||||||
include it in your source code.
|
include it in your source code.
|
||||||
@ -26,7 +33,7 @@ include it in your source code.
|
|||||||
cc_binary(
|
cc_binary(
|
||||||
name = "main",
|
name = "main",
|
||||||
srcs = ["main.cc"],
|
srcs = ["main.cc"],
|
||||||
deps = ["@glog//:glog"],
|
deps = ["@com_github_google_glog//:glog"],
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -1419,7 +1419,7 @@ T CheckNotNull(const char* file, int line, const char* names, T&& t) {
|
|||||||
struct LogMessageVoidify {
|
struct LogMessageVoidify {
|
||||||
// This has to be an operator with a precedence lower than << but
|
// This has to be an operator with a precedence lower than << but
|
||||||
// higher than ?:
|
// higher than ?:
|
||||||
constexpr void operator&(std::ostream&) const noexcept {}
|
void operator&(std::ostream&) noexcept {}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|||||||
@ -995,22 +995,7 @@ bool LogFileObject::CreateLogfile(const string& time_pid_string) {
|
|||||||
if (FLAGS_timestamp_in_logfile_name) {
|
if (FLAGS_timestamp_in_logfile_name) {
|
||||||
// demand that the file is unique for our timestamp (fail if it exists).
|
// demand that the file is unique for our timestamp (fail if it exists).
|
||||||
flags = flags | O_EXCL;
|
flags = flags | O_EXCL;
|
||||||
} else {
|
|
||||||
// logs are written to a single file, where: a log file is created for the
|
|
||||||
// the first time or a file is being recreated due to exceeding max size
|
|
||||||
|
|
||||||
struct stat statbuf;
|
|
||||||
if (stat(filename, &statbuf) == 0) {
|
|
||||||
// truncate the file if it exceeds the max size
|
|
||||||
if ((static_cast<uint32>(statbuf.st_size) >> 20U) >= MaxLogSize()) {
|
|
||||||
flags |= O_TRUNC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// update file length to sync file size
|
|
||||||
file_length_ = static_cast<uint32>(statbuf.st_size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FileDescriptor fd{
|
FileDescriptor fd{
|
||||||
open(filename, flags, static_cast<mode_t>(FLAGS_logfile_mode))};
|
open(filename, flags, static_cast<mode_t>(FLAGS_logfile_mode))};
|
||||||
if (!fd) return false;
|
if (!fd) return false;
|
||||||
|
|||||||
@ -110,7 +110,6 @@ static void TestLogSinkWaitTillSent();
|
|||||||
static void TestCHECK();
|
static void TestCHECK();
|
||||||
static void TestDCHECK();
|
static void TestDCHECK();
|
||||||
static void TestSTREQ();
|
static void TestSTREQ();
|
||||||
static void TestMaxLogSizeWhenNoTimestamp();
|
|
||||||
static void TestBasename();
|
static void TestBasename();
|
||||||
static void TestBasenameAppendWhenNoTimestamp();
|
static void TestBasenameAppendWhenNoTimestamp();
|
||||||
static void TestTwoProcessesWrite();
|
static void TestTwoProcessesWrite();
|
||||||
@ -289,7 +288,6 @@ int main(int argc, char** argv) {
|
|||||||
MungeAndDiffTestStdout(FLAGS_test_srcdir + "/src/logging_unittest.out"));
|
MungeAndDiffTestStdout(FLAGS_test_srcdir + "/src/logging_unittest.out"));
|
||||||
FLAGS_logtostdout = false;
|
FLAGS_logtostdout = false;
|
||||||
|
|
||||||
TestMaxLogSizeWhenNoTimestamp();
|
|
||||||
TestBasename();
|
TestBasename();
|
||||||
TestBasenameAppendWhenNoTimestamp();
|
TestBasenameAppendWhenNoTimestamp();
|
||||||
TestTwoProcessesWrite();
|
TestTwoProcessesWrite();
|
||||||
@ -808,47 +806,6 @@ static void CheckFile(const string& name, const string& expected_string,
|
|||||||
<< expected_string << " in " << files[0];
|
<< expected_string << " in " << files[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TestMaxLogSizeWhenNoTimestamp() {
|
|
||||||
fprintf(stderr, "==== Test setting max log size without timestamp\n");
|
|
||||||
const string dest = FLAGS_test_tmpdir + "/logging_test_max_log_size";
|
|
||||||
DeleteFiles(dest + "*");
|
|
||||||
|
|
||||||
auto original_max_log_size = FLAGS_max_log_size;
|
|
||||||
auto original_timestamp_in_logfile_name = FLAGS_timestamp_in_logfile_name;
|
|
||||||
|
|
||||||
FLAGS_max_log_size = 1; // Set max log size to 1MB
|
|
||||||
FLAGS_timestamp_in_logfile_name = false;
|
|
||||||
|
|
||||||
// Set log destination
|
|
||||||
SetLogDestination(GLOG_INFO, dest.c_str());
|
|
||||||
|
|
||||||
// 1e4 info logs -> is about 772 KB in size
|
|
||||||
// 2e4 info logs -> is around 1500 KB in size -> 1.5MB
|
|
||||||
// If our max_log_size constraint is respected, it will truncate earlier logs
|
|
||||||
// and the file size will be lesser than 1MB (around 0.5MB)
|
|
||||||
const int num_logs = 2e4;
|
|
||||||
for (int i = 0; i < num_logs; i++) {
|
|
||||||
LOG(INFO) << "Hello world";
|
|
||||||
}
|
|
||||||
FlushLogFiles(GLOG_INFO);
|
|
||||||
|
|
||||||
// Check log file size
|
|
||||||
struct stat statbuf;
|
|
||||||
stat(dest.c_str(), &statbuf);
|
|
||||||
|
|
||||||
// Verify file size is less than the max log size limit
|
|
||||||
CHECK_LT(static_cast<unsigned int>(statbuf.st_size),
|
|
||||||
FLAGS_max_log_size << 20U);
|
|
||||||
|
|
||||||
// Reset flag values to their original values
|
|
||||||
FLAGS_max_log_size = original_max_log_size;
|
|
||||||
FLAGS_timestamp_in_logfile_name = original_timestamp_in_logfile_name;
|
|
||||||
|
|
||||||
// Release file handle for the destination file to unlock the file in Windows.
|
|
||||||
LogToStderr();
|
|
||||||
DeleteFiles(dest + "*");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TestBasename() {
|
static void TestBasename() {
|
||||||
fprintf(stderr, "==== Test setting log file basename\n");
|
fprintf(stderr, "==== Test setting log file basename\n");
|
||||||
const string dest = FLAGS_test_tmpdir + "/logging_test_basename";
|
const string dest = FLAGS_test_tmpdir + "/logging_test_basename";
|
||||||
|
|||||||
@ -55,10 +55,6 @@
|
|||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_SYS_SYSCALL_H) && defined(HAVE_SYS_TYPES_H)
|
|
||||||
# include <sys/syscall.h>
|
|
||||||
# include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace google {
|
namespace google {
|
||||||
|
|
||||||
@ -220,14 +216,8 @@ void DumpSignalInfo(int signal_number, siginfo_t* siginfo) {
|
|||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << std::showbase << std::hex << std::this_thread::get_id();
|
oss << std::showbase << std::hex << std::this_thread::get_id();
|
||||||
formatter.AppendString(oss.str().c_str());
|
formatter.AppendString(oss.str().c_str());
|
||||||
# if defined(GLOG_OS_LINUX) && defined(HAVE_SYS_SYSCALL_H) && \
|
|
||||||
defined(HAVE_SYS_TYPES_H)
|
|
||||||
pid_t tid = syscall(SYS_gettid);
|
|
||||||
formatter.AppendString(" LWP ");
|
|
||||||
formatter.AppendUint64(static_cast<uint64>(tid), 10);
|
|
||||||
# endif
|
|
||||||
formatter.AppendString(") ");
|
|
||||||
|
|
||||||
|
formatter.AppendString(") ");
|
||||||
// Only linux has the PID of the signal sender in si_pid.
|
// Only linux has the PID of the signal sender in si_pid.
|
||||||
# ifdef GLOG_OS_LINUX
|
# ifdef GLOG_OS_LINUX
|
||||||
formatter.AppendString("from PID ");
|
formatter.AppendString("from PID ");
|
||||||
|
|||||||
@ -77,10 +77,6 @@
|
|||||||
# error "symbolize.h" was not included correctly.
|
# error "symbolize.h" was not included correctly.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// We prefer to let the build system detect the availability of certain features
|
|
||||||
// such as symbolization support. HAVE_SYMBOLIZE should therefore be defined by
|
|
||||||
// the build system in general unless there is a good reason to perform the
|
|
||||||
// detection using the preprocessor.
|
|
||||||
#ifndef GLOG_NO_SYMBOLIZE_DETECTION
|
#ifndef GLOG_NO_SYMBOLIZE_DETECTION
|
||||||
# ifndef HAVE_SYMBOLIZE
|
# ifndef HAVE_SYMBOLIZE
|
||||||
// defined by gcc
|
// defined by gcc
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user