Closed Bug 1662608 Opened 6 months ago Closed 6 months ago

Set -fcrash-diagnostics-dir in build-clang.py

Categories

(Firefox Build System :: Toolchains, enhancement)

enhancement

Tracking

(firefox82 fixed)

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: dmajor, Assigned: dmajor)

Details

Attachments

(1 file)

No description provided.

This will let us get reproducers for compiler self-host assertion failures.

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1d92340a0f3c
Set -fcrash-diagnostics-dir in build-clang.py r=froydnj CLOSED TREE

Backed out changeset 1d92340a0f3c (bug 1662608) for clang5.0 failures.

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedTaskRun=KKn7c9iWSXG-7ESCrt4Ing.0&searchStr=toolchains&fromchange=1d92340a0f3c2b5039fc1ba090b0a5cc9dcbe9a6&tochange=5ae3f7011ba21ab9ccf79999b7cdab9f18648d7e

Backout link: https://hg.mozilla.org/integration/autoland/rev/5ae3f7011ba21ab9ccf79999b7cdab9f18648d7e

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=315136757&repo=autoland&lineNumber=8314

[task 2020-09-08T22:25:48.206Z] -- Installing: /builds/worker/fetches/llvm-project/build/stage1/clang/lib/cmake/llvm/./FindOCaml.cmake
[task 2020-09-08T22:25:48.649Z] cd "/builds/worker/fetches/llvm-project"
[task 2020-09-08T22:25:48.649Z] cd "/builds/worker/fetches/llvm-project/build/stage2/build"
[task 2020-09-08T22:25:48.649Z] cmake -GNinja -DCMAKE_C_COMPILER=/builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang -DCMAKE_CXX_COMPILER=/builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang++ -DCMAKE_ASM_COMPILER=/builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang -DCMAKE_LINKER=/builds/worker/fetches/binutils/bin/ld -DCMAKE_AR=/builds/worker/fetches/binutils/bin/ar -DCMAKE_C_FLAGS=-fPIC -gcc-toolchain /builds/worker/fetches/llvm-project/build/stage1/clang -fcrash-diagnostics-dir=/builds/worker/artifacts -DCMAKE_CXX_FLAGS=-fPIC -Qunused-arguments -gcc-toolchain /builds/worker/fetches/llvm-project/build/stage1/clang -fcrash-diagnostics-dir=/builds/worker/artifacts -DCMAKE_ASM_FLAGS= -DCMAKE_EXE_LINKER_FLAGS=-Wl,-Bsymbolic-functions -fuse-ld=gold -Wl,--gc-sections -Wl,--icf=safe -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-Bsymbolic-functions -fuse-ld=gold -Wl,--gc-sections -Wl,--icf=safe -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/builds/worker/fetches/llvm-project/build/stage2/clang -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ASSERTIONS=OFF -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DLLVM_TOOL_LIBCXX_BUILD=ON -DLLVM_ENABLE_BINDINGS=OFF -DLLVM_ENABLE_PROJECTS=clang;compiler-rt -DLLVM_BINUTILS_INCDIR=/builds/worker/fetches/gcc/include -DLLVM_ENABLE_LIBXML2=FORCE_ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_RANLIB=/builds/worker/fetches/binutils/bin/ranlib /builds/worker/fetches/llvm-project/llvm
[task 2020-09-08T22:25:48.665Z] CMake Deprecation Warning at CMakeLists.txt:15 (cmake_policy):
[task 2020-09-08T22:25:48.665Z]   The OLD behavior for policy CMP0051 will be removed from a future version
[task 2020-09-08T22:25:48.665Z]   of CMake.
[task 2020-09-08T22:25:48.665Z] 
[task 2020-09-08T22:25:48.665Z]   The cmake-policies(7) manual explains that the OLD behaviors of all
[task 2020-09-08T22:25:48.665Z]   policies are deprecated and that a policy should be set to OLD only under
[task 2020-09-08T22:25:48.665Z]   specific short-term circumstances.  Projects should be ported to the NEW
[task 2020-09-08T22:25:48.665Z]   behavior and not rely on setting a policy to OLD.
[task 2020-09-08T22:25:48.665Z] 
[task 2020-09-08T22:25:48.665Z] 
[task 2020-09-08T22:25:48.878Z] -- The C compiler identification is Clang 5.0.2
[task 2020-09-08T22:25:49.085Z] -- The CXX compiler identification is Clang 5.0.2
[task 2020-09-08T22:25:49.117Z] -- The ASM compiler identification is Clang
[task 2020-09-08T22:25:49.120Z] -- Found assembler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang
[task 2020-09-08T22:25:49.132Z] -- Check for working C compiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang
[task 2020-09-08T22:25:49.165Z] -- Check for working C compiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang -- broken
[task 2020-09-08T22:25:49.165Z] CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
[task 2020-09-08T22:25:49.165Z]   The C compiler
[task 2020-09-08T22:25:49.165Z] 
[task 2020-09-08T22:25:49.165Z]     "/builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang"
[task 2020-09-08T22:25:49.165Z] 
[task 2020-09-08T22:25:49.165Z]   is not able to compile a simple test program.
[task 2020-09-08T22:25:49.165Z] 
[task 2020-09-08T22:25:49.165Z]   It fails with the following output:
[task 2020-09-08T22:25:49.165Z] 
[task 2020-09-08T22:25:49.165Z]     Change Dir: /builds/worker/fetches/llvm-project/build/stage2/build/CMakeFiles/CMakeTmp
[task 2020-09-08T22:25:49.165Z]     
[task 2020-09-08T22:25:49.165Z]     Run Build Command(s):/usr/bin/ninja cmTC_4559e && [1/2] Building C object CMakeFiles/cmTC_4559e.dir/testCCompiler.c.o
[task 2020-09-08T22:25:49.165Z]     FAILED: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang   -fPIC -gcc-toolchain /builds/worker/fetches/llvm-project/build/stage1/clang -fcrash-diagnostics-dir=/builds/worker/artifacts -o CMakeFiles/cmTC_4559e.dir/testCCompiler.c.o   -c testCCompiler.c
[task 2020-09-08T22:25:49.165Z]     clang-5.0: error: unknown argument: '-fcrash-diagnostics-dir=/builds/worker/artifacts'
[task 2020-09-08T22:25:49.165Z]     ninja: build stopped: subcommand failed.
[task 2020-09-08T22:25:49.166Z]     
[task 2020-09-08T22:25:49.166Z]     
[task 2020-09-08T22:25:49.166Z] 
[task 2020-09-08T22:25:49.166Z]   
[task 2020-09-08T22:25:49.166Z] 
[task 2020-09-08T22:25:49.166Z]   CMake will not be able to correctly generate this project.
[task 2020-09-08T22:25:49.166Z] Call Stack (most recent call first):
[task 2020-09-08T22:25:49.166Z]   CMakeLists.txt:54 (project)
[task 2020-09-08T22:25:49.166Z] 
[task 2020-09-08T22:25:49.166Z] 
[task 2020-09-08T22:25:49.168Z] -- Configuring incomplete, errors occurred!
[task 2020-09-08T22:25:49.168Z] See also "/builds/worker/fetches/llvm-project/build/stage2/build/CMakeFiles/CMakeOutput.log".
[task 2020-09-08T22:25:49.169Z] See also "/builds/worker/fetches/llvm-project/build/stage2/build/CMakeFiles/CMakeError.log".
[task 2020-09-08T22:25:49.176Z] 
[task 2020-09-08T22:25:49.176Z] Contents of b'/builds/worker/fetches/llvm-project/build/stage2/build/CMakeFiles/CMakeOutput.log' follow
[task 2020-09-08T22:25:49.176Z] 
[task 2020-09-08T22:25:49.176Z] b'The system is: Linux - 4.4.0-1014-aws - x86_64\nCompiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang \nBuild flags: \nId flags:  \n\nThe output was:\n0\n\n\nCompilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"\n\nThe C compiler identification is Clang, found in "/builds/worker/fetches/llvm-project/build/stage2/build/CMakeFiles/3.16.3/CompilerIdC/a.out"\n\nCompiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang++ \nBuild flags: \nId flags:  \n\nThe output was:\n0\n\n\nCompilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"\n\nThe CXX compiler identification is Clang, found in "/builds/worker/fetches/llvm-project/build/stage2/build/CMakeFiles/3.16.3/CompilerIdCXX/a.out"\n\nChecking whether the ASM compiler is Clang using "--version" matched "(clang version)":\nclang version 5.0.2 \nTarget: x86_64-unknown-linux-gnu\nThread model: posix\nInstalledDir: /builds/worker/fetches/llvm-project/build/stage1/clang/bin\n'
[task 2020-09-08T22:25:49.176Z] 
[task 2020-09-08T22:25:49.176Z] Contents of b'/builds/worker/fetches/llvm-project/build/stage2/build/CMakeFiles/CMakeError.log' follow
[task 2020-09-08T22:25:49.176Z] 
[task 2020-09-08T22:25:49.176Z] b'Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang \nBuild flags: -fPIC;-gcc-toolchain;/builds/worker/fetches/llvm-project/build/stage1/clang;-fcrash-diagnostics-dir=/builds/worker/artifacts\nId flags:  \n\nThe output was:\n1\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\n\n\nCompiling the C compiler identification source file "CMakeCCompilerId.c" failed.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang \nBuild flags: -fPIC;-gcc-toolchain;/builds/worker/fetches/llvm-project/build/stage1/clang;-fcrash-diagnostics-dir=/builds/worker/artifacts\nId flags: -c \n\nThe output was:\n1\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\n\n\nCompiling the C compiler identification source file "CMakeCCompilerId.c" failed.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang \nBuild flags: -fPIC;-gcc-toolchain;/builds/worker/fetches/llvm-project/build/stage1/clang;-fcrash-diagnostics-dir=/builds/worker/artifacts\nId flags: -Aa \n\nThe output was:\n1\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\n\n\nCompiling the C compiler identification source file "CMakeCCompilerId.c" failed.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang \nBuild flags: -fPIC;-gcc-toolchain;/builds/worker/fetches/llvm-project/build/stage1/clang;-fcrash-diagnostics-dir=/builds/worker/artifacts\nId flags: -D__CLASSIC_C__ \n\nThe output was:\n1\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\n\n\nCompiling the C compiler identification source file "CMakeCCompilerId.c" failed.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang \nBuild flags: -fPIC;-gcc-toolchain;/builds/worker/fetches/llvm-project/build/stage1/clang;-fcrash-diagnostics-dir=/builds/worker/artifacts\nId flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 \n\nThe output was:\n1\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\n\n\nCompiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang++ \nBuild flags: -fPIC;-Qunused-arguments;-gcc-toolchain;/builds/worker/fetches/llvm-project/build/stage1/clang;-fcrash-diagnostics-dir=/builds/worker/artifacts\nId flags:  \n\nThe output was:\n1\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\n\n\nCompiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang++ \nBuild flags: -fPIC;-Qunused-arguments;-gcc-toolchain;/builds/worker/fetches/llvm-project/build/stage1/clang;-fcrash-diagnostics-dir=/builds/worker/artifacts\nId flags: -c \n\nThe output was:\n1\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\n\n\nCompiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang++ \nBuild flags: -fPIC;-Qunused-arguments;-gcc-toolchain;/builds/worker/fetches/llvm-project/build/stage1/clang;-fcrash-diagnostics-dir=/builds/worker/artifacts\nId flags: --c++ \n\nThe output was:\n1\nclang-5.0: error: unsupported option \'--c++\'\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\n\n\nCompiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang++ \nBuild flags: -fPIC;-Qunused-arguments;-gcc-toolchain;/builds/worker/fetches/llvm-project/build/stage1/clang;-fcrash-diagnostics-dir=/builds/worker/artifacts\nId flags: --ec++ \n\nThe output was:\n1\nclang-5.0: error: unsupported option \'--ec++\'\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\n\n\nCompiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.\nCompiler: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang++ \nBuild flags: -fPIC;-Qunused-arguments;-gcc-toolchain;/builds/worker/fetches/llvm-project/build/stage1/clang;-fcrash-diagnostics-dir=/builds/worker/artifacts\nId flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3 \n\nThe output was:\n1\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\n\n\nChecking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":\nclang version 5.0.2 \nTarget: x86_64-unknown-linux-gnu\nThread model: posix\nInstalledDir: /builds/worker/fetches/llvm-project/build/stage1/clang/bin\nDetermining if the C compiler works failed with the following output:\nChange Dir: /builds/worker/fetches/llvm-project/build/stage2/build/CMakeFiles/CMakeTmp\n\nRun Build Command(s):/usr/bin/ninja cmTC_4559e && [1/2] Building C object CMakeFiles/cmTC_4559e.dir/testCCompiler.c.o\nFAILED: /builds/worker/fetches/llvm-project/build/stage1/clang/bin/clang   -fPIC -gcc-toolchain /builds/worker/fetches/llvm-project/build/stage1/clang -fcrash-diagnostics-dir=/builds/worker/artifacts -o CMakeFiles/cmTC_4559e.dir/testCCompiler.c.o   -c testCCompiler.c\nclang-5.0: error: unknown argument: \'-fcrash-diagnostics-dir=/builds/worker/artifacts\'\nninja: build stopped: subcommand failed.\n\n\n\n'
[task 2020-09-08T22:25:49.176Z] cd "/builds/worker/fetches/llvm-project"
[task 2020-09-08T22:25:49.178Z] Traceback (most recent call last):
[task 2020-09-08T22:25:49.178Z]   File "/builds/worker/workspace/build/src/build/build-clang/build-clang.py", line 865, in <module>
[task 2020-09-08T22:25:49.178Z]     extra_targets=extra_targets, pgo_phase=pgo_phase)
[task 2020-09-08T22:25:49.178Z]   File "/builds/worker/workspace/build/src/build/build-clang/build-clang.py", line 412, in build_one_stage
[task 2020-09-08T22:25:49.178Z]     build_package(build_dir, cmake_args)
[task 2020-09-08T22:25:49.178Z]   File "/builds/worker/workspace/build/src/build/build-clang/build-clang.py", line 126, in build_package
[task 2020-09-08T22:25:49.178Z]     run_in(package_build_dir, ["cmake"] + cmake_args)
[task 2020-09-08T22:25:49.178Z]   File "/builds/worker/workspace/build/src/build/build-clang/build-clang.py", line 80, in run_in
[task 2020-09-08T22:25:49.178Z]     check_run(args)
[task 2020-09-08T22:25:49.178Z]   File "/builds/worker/workspace/build/src/build/build-clang/build-clang.py", line 75, in check_run
[task 2020-09-08T22:25:49.178Z]     assert r == 0
[task 2020-09-08T22:25:49.178Z] AssertionError
[taskcluster 2020-09-08 22:25:49.765Z] === Task Finished ===
[taskcluster 2020-09-08 22:25:49.883Z] Artifact "public/build" not found at "/builds/worker/artifacts/"
[taskcluster 2020-09-08 22:25:50.006Z] Unsuccessful task run with exit code: 1 completed in 667.091 seconds
Flags: needinfo?(dmajor)
Flags: needinfo?(dmajor)
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/63b8140d1a73
Set -fcrash-diagnostics-dir in build-clang.py r=froydnj
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in before you can comment on or make changes to this bug.