Two commits in this one:
azure-pipelines: Fix ASAN not being enabled on Linux bot
Unfortunately, the following CL did not correctly spell out the CMake
variable to enable ASAN properly:
https://github.com/microsoft/DirectXShaderCompiler/pull/5799
This commit fixes that.
azure-pipelines: disable ASAN alloc_dealloc_mismatch checks
We are currently hitting false positives because of this. See the issue
I opened: https://github.com/microsoft/DirectXShaderCompiler/issues/5971
Perhaps a future Linux image will include a build of libc++ that does
not exhibit this false positive, at which point this workaround can be
reverted.
Two commits:
azure-pipelines: Use 'lld' linker for Linux builds
This should speed up the total build time using a faster linker.
azure-pipelines: Add verbose flag to LLVM_LIT_ARGS
With `--xunit-xml-output` set, stderr is not fed to stdout, so we cannot
easily see the errors in the build log. The errors only appear in the
pipeline's "Test" tab. Adding the verbose flag allows it to also output
stderr to the log.
Address sanitizer can detect all sorts of memory usage related bugs.
Things like overflows, underflows, use-after-free, and (on Linux) leaks.
Due to the great work by @amaiorano, DXC is now asan-clean in our test
suite. Enabling this in our PR builds will allow us to stay that way.
I've chosen the Linux builds because the Linux runtime hooks capture
more errors than on other platforms. It only runs in the Release
configuration because asan can have significant runtime overhead so
running it in a release configuration will mitigate that substantially.
I've also changed the build to use libc++ instead of libstdc++ because
the libc++ headers have additional address sanitizer annotations to
catch misuses of C++ standard library containers.
* Enable lit by default.
* Update README for git user bin.
* Add DXC_DISABLE_LIT to replace DXC_ENABLE_LIT
* Set -DDXC_DISABLE_LIT=Off for appveyor.
* Keep original name for ClangSPIRVTests
* Set correct path for unit tests binary.
* Remove doc about DXC_DISABLE_LIT
* Remove extra space.
* Remove DxcOnUnix.rst.
This fixes some fallthrough warnings that were appearing in C source
files and enables -Werror for both C and C++ sources.
Additionally, this fixes some GCC warnings and migrates AppVeyor builds
to building with clang-14 to reach agreement between GCC and Clang
about what is valid in C++.
I didn't have this configured correctly to run on failing builds... obviously that is where this is more useful. Additionally ADO expects XUnit 2, but LIT generates XUnit 1. XUnit 1 is close to JUnit, so we can use that instead.
* Update Linux build and test workflows to use lit
This change updates the build and test workflows in our azure pipelines
and the GitHub action for code coverage data to use lit instead of ctest
as the test runner. This adds additional test coverage by running some
of the LLVM & Clang tests.
* Fix missing dependency between LLVMAnalysis & DXIL
The default Linux linker fails because LLVMAnalysis depends on LLVMDXIL
and BFD doesn't cycle libraries.
* Updating pipelines to remove mkdir and cd
This just cleans up the pipeline shell commands to avoid unnecissary
mkdir and cd invocations.
Based on feedback from @Keenuts. Thanks!
* Disable LLVM LIT tests that use garbage collection
DXC disabled support for the LLVM garbage collection intrinsics.
This updates the ADO yaml to select the latest version of the OS. In the
case of MacOS, this will still be 11 for now. For Ubuntu, it will
silence the warnings that we are using a deprecated version and save us
the headache of having to do this again.
The risk is that a new version of either OS will cause the build to
break without our intervention, but the real motivation for explicit
versions was an earlier impulse to support the minimal build system that
is no longer a priority. As for the risk, I feel it is minimal and we
can respond in a timely fashion if it should occur.
CMake supports passing in CMake scripts via the `-C` command line
option, which can set CMake cache variables to initialize options
before the first CMakeLists file is processed. This is a portable and
shell-agnostic way of supporting what the
`cmake-predefined-config-params` file is used for.
Travis went from org to com. In spite of the perfectly reasonable
assumption and explicitly stated expectation of the simplicity that
transition would involve, multiple engineers from multiple companies
failed to decipher their arcane instructions and permissions. Instead,
we've switched from leeching off of a well-meaning small outfit trying
to promote open source projects at no charge to leeching off Microsoft's
own ample resources.
This replaces all of the testing of travis with Azure Dev Ops (azdo).
The version of Ubuntu is bumped from 14.04 to 18.04, but that was
overdue. The corresponding clang and gcc versions are incremented as
well from 5 to 9 and 5 to 7 respectively with an eye toward the lowest
supported version in the current OS. The MacOS version is similarly
incremented with the clang version jumping to 11. In all cases, these
versions are the lowest azdo provides on the respective platforms.
Left out for now is the address sanitizer configuration, which was
never made blocking. The longevity of this decision is pending cross
company discussions.