absl/debugging/BUILD.gn shouldn't define LEAK_SANITIZER |
||
Issue descriptionI'm building chrome with a locally-built clang to test something. I haven't built compiler-rt (where the sanitizer runtimes live), but I'm not doing a sanitizer build so that should be fine. Alas, my build fails like so: [1/9764] CXX obj/third_party/abseil-cpp/absl/debugging/leak_check_api_enabled_for_testing/leak_check.obj FAILED: obj/third_party/abseil-cpp/absl/debugging/leak_check_api_enabled_for_testing/leak_check.obj ../../../../llvm-build/bin/clang-cl /nologo /showIncludes "-imsvc../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/win_sdk/Include/10.0.17134.0/um" "-imsvc../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/win_sdk/Include/10.0.17134.0/shared" "-imsvc../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/win_sdk/Include/10.0.17134.0/winrt" "-imsvc../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/win_sdk/Include/10.0.17134.0/ucrt" "-imsvc../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/VC/Tools/MSVC/14.14.26428/include" "-imsvc../../third_party/depot_tools/win_toolchain/vs_files/3bc0ec615cf20ee342f3bc29bc991b5ad66d8d2c/VC/Tools/MSVC/14.14.26428/atlmfc/include" -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_HAS_EXCEPTIONS=0 -DCOMPONENT_BUILD -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=1 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A000002 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -I../.. -Igen /utf-8 /X -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -fmerge-all-constants /Gy /FS /bigobj /d2FastFail /Zc:sizedDealloc- -fmsc-version=1911 -m64 /Brepro /O1 /Ob2 /Oy- /Zc:inline /Gw /Oi /MD -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare /W3 /wd4800 /wd4267 /wd4996 -Wno-unused-variable /WX /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /wd4200 /wd4201 /wd4204 /wd4221 /wd4018 /wd4245 /wd4267 /wd4305 /wd4389 /wd4702 /wd4701 /wd4703 /wd4661 /wd4706 /wd4715 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-address-of-packed-member -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -Wno-ignored-pragma-optimize -imsvc ../../third_party/abseil-cpp -DLEAK_SANITIZER /TP /GR- /wd4577 -Wno-c++98-compat-pedantic -Wno-conversion -Wno-covered-switch-default -Wno-deprecated -Wno-disabled-macro-expansion -Wno-double-promotion -Wno-comma -Wno-extra-semi -Wno-packed -Wno-padded -Wno-float-conversion -Wno-float-equal -Wno-format-nonliteral -Wno-gcc-compat -Wno-global-constructors -Wno-exit-time-destructors -Wno-nested-anon-types -Wno-non-modular-include-in-module -Wno-old-style-cast -Wno-range-loop-analysis -Wno-reserved-id-macro -Wno-shorten-64-to-32 -Wno-switch-enum -Wno-thread-safety-negative -Wno-undef -Wno-unknown-warning-option -Wno-unreachable-code -Wno-unused-macros -Wno-weak-vtables -Wbitfield-enum-conversion -Wbool-conversion -Wconstant-conversion -Wenum-conversion -Wint-conversion -Wliteral-conversion -Wnon-literal-null-conversion -Wnull-conversion -Wobjc-literal-conversion -Wno-sign-conversion -Wstring-conversion /c ../../third_party/abseil-cpp/absl/debugging/leak_check.cc /Foobj/third_party/abseil-cpp/absl/debugging/leak_check_api_enabled_for_testing/leak_check.obj /Fd"obj/third_party/abseil-cpp/absl/debugging/leak_check_api_enabled_for_testing_cc.pdb" ../../third_party/abseil-cpp/absl/debugging/leak_check.cc(33,10): fatal error: 'sanitizer/lsan_interface.h' file not found #include <sanitizer/lsan_interface.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ That include is protected by a defined(LEAK_SANITIZER). is_lsan isn't set so https://cs.chromium.org/chromium/src/build/config/BUILD.gn?type=cs&q=leak_sanitizer+file:%5C.gn&sq=package:chromium&g=0&l=107 doesn't add it. However, the absl build files define it: https://cs.chromium.org/chromium/src/third_party/abseil-cpp/absl/debugging/BUILD.gn?type=cs&q=leak_sanitizer+file:%5C.gn&sq=package:chromium&g=0&l=194 Project build files have no business defining macros for global build settings. (Also, https://cs.chromium.org/search/?q=leak_sanitizer+file:%5C.gn&sq=package:chromium&type=cs finds absl in third_party/absl and in third_part/webrtc/third_party/absl -- I hope webrtc doesn't deps in absl when it's part of the chromium build but uses chromium's?)
,
Jun 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4b6510dcb7c2143ba376b2d61f60d1ec22447c5d commit 4b6510dcb7c2143ba376b2d61f60d1ec22447c5d Author: Mirko Bonadei <mbonadei@chromium.org> Date: Fri Jun 15 16:22:32 2018 Removing definition of lsan macros from Abseil BUILD.gn files. Sanitizers macros should never be defined in a project BUILD.gn files. Bug: 852817 Change-Id: I55597f31042ebeaf6aae8c8670892a9ba7f49417 Reviewed-on: https://chromium-review.googlesource.com/1102566 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Mirko Bonadei <mbonadei@chromium.org> Cr-Commit-Position: refs/heads/master@{#567679} [modify] https://crrev.com/4b6510dcb7c2143ba376b2d61f60d1ec22447c5d/third_party/abseil-cpp/absl/debugging/BUILD.gn
,
Jun 15 2018
Let me follow up about the question on third_party. I'll be back.
,
Jun 15 2018
Ok, I confirm you that we always use //third_party/abseil-cpp and never //third_party/webrtc/third_party/abseil-cpp. WebRTC's deps on third_party in BUILD.gn files start with // so when we are building with Chromium we pick the right one (and the same goes with the standalone build). //third_party/webrtc/third_party is a unfortunate side effect of a re-organization of the WebRTC's third_party directory (we will remove it soon though).
,
Jun 15 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by mbonadei@chromium.org
, Jun 14 2018