Issue number of the reported bug or feature request
Internal ticket
Describe your changes
1. Move code to build against LLVM-9
src/collectors/include_graph/include_finder.h, and rc/collectors/include_graph/include_finder.cpp, used the LLVM_VERSION macros to declare overrides for a method.
This was previously introduced because of an API change by LLVM (via #23). These are no longer necessary as LLVM-8 is now the minimum version required for our toolset.
2. Refactor CI
We use a .travis.clang$LLVM_VERSION.Dockerfile for each $LLVM_VERSION we support. I noticed these were somewhat out of sync with the toolchains and libraries installed.
I've merged these two into a single Dockerfile that can specify a default LLVM_VERSION and ubuntu release to build against.
travis.yml has been updated to test with the right build args. This change should allow us to run broader matrix CI builds, if necessary.
3. Change test suite to use death tests where appropriate
As pointed out by @dbeer1 LLVM on ubuntu is built with -fno-exceptions, which conflicts with our code. This issue was exposed when a build against LLVM-9 was attempted, and we failed to catch the exception we tried to throw in our tests (because libstdc++ failed stack unwind information in a parent of the frame that threw the exception)
The function now returns a boolean if successful, and crashes on failure, the tests have been updated to test for this behaviour.
The tool-application-support tests don't work on macOS yet, so I've added a macro to disable them if the target architecture is an apple device, so that it is clear that this is a known issue.
Testing performed
Built and tested with the following parameters, and it passes:
LLVM_VERSION=7, base-image=ubuntu-18.04
LLVM_VERSION=8, base-image=ubuntu-18.10
LLVM_VERSION=9, base-image=ubuntu-19.04
LLVM_VERSION=9, macOSX (All tests pass except for the disabled ones)
Issue number of the reported bug or feature request
Internal ticket
Describe your changes
1. Move code to build against LLVM-9
src/collectors/include_graph/include_finder.h
, andrc/collectors/include_graph/include_finder.cpp
, used theLLVM_VERSION
macros to declare overrides for a method.This was previously introduced because of an API change by LLVM (via #23). These are no longer necessary as LLVM-8 is now the minimum version required for our toolset.
2. Refactor CI
We use a
.travis.clang$LLVM_VERSION.Dockerfile
for each$LLVM_VERSION
we support. I noticed these were somewhat out of sync with the toolchains and libraries installed.I've merged these two into a single
Dockerfile
that can specify a defaultLLVM_VERSION
and ubuntu release to build against.travis.yml
has been updated to test with the right build args. This change should allow us to run broader matrix CI builds, if necessary.3. Change test suite to use death tests where appropriate
As pointed out by @dbeer1 LLVM on ubuntu is built with
-fno-exceptions
, which conflicts with our code. This issue was exposed when a build against LLVM-9 was attempted, and we failed to catch the exception we tried to throw in our tests (because libstdc++ failed stack unwind information in a parent of the frame that threw the exception)The function now returns a boolean if successful, and crashes on failure, the tests have been updated to test for this behaviour.
The
tool-application-support
tests don't work onmacOS
yet, so I've added a macro to disable them if the target architecture is an apple device, so that it is clear that this is a known issue.Testing performed
Built and tested with the following parameters, and it passes:
ubuntu-18.04
ubuntu-18.10
ubuntu-19.04