summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bindings/Go
Commit message (Collapse)AuthorAgeFilesLines
* Replace 'REQUIRES: not_?san' with 'UNSUPPORTED: ?san' as that betterPaul Robinson2019-05-101-1/+2
| | | | | | expresses the intent of the exclusion. llvm-svn: 360449
* [Go / ASAN] Disable Go bindings for ASAN tests.Mitch Phillips2019-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Go binding tests fail under ASAN with the error at the bottom of this commit message. The reason the buildbots are not currently always failing on this test is that they selectively disable the bindings due to a Go binary not being present on their system. This change should allow users to build an asan-bootstrapped compiler and run asan-ified unit tests locally, similar to the way that sanitizer-* buildbots do. The error is: ``` FAIL: LLVM :: Bindings/Go/go.test (7050 of 30112) ******************** TEST 'LLVM :: Bindings/Go/go.test' FAILED ******************** Script: -- : 'RUN: at line 1'; /usr/local/google/home/mitchp/llvm-build/asan/sanitized-clang/bin/llvm-go go=/usr/lib/google-golang/bin/go test llvm.org/llvm/bindings/go/llvm -- Exit Code: 1 Command Output (stdout): -- FAIL llvm.org/llvm/bindings/go/llvm [build failed] -- Command Output (stderr): -- ld.lld: error: undefined symbol: std::allocator<char>::allocator() >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(LLVMAddDataFlowSanitizerPass) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(LLVMAddDataFlowSanitizerPass) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(LLVMAddDataFlowSanitizerPass) ld.lld: error: undefined symbol: std::allocator<char>::~allocator() >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(LLVMAddDataFlowSanitizerPass) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(LLVMAddDataFlowSanitizerPass) ld.lld: error: undefined symbol: std::allocator<char>::~allocator() >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(LLVMAddDataFlowSanitizerPass) ld.lld: error: undefined symbol: llvm::createDataFlowSanitizerPass(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, void* (*)(), void* (*)()) >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(LLVMAddDataFlowSanitizerPass) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(void std::_Destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(void __gnu_cxx::new_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::construct<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)) ld.lld: error: undefined symbol: std::__throw_length_error(char const*) >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_check_len(unsigned long, char const*) const) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(void std::_Construct<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() >>> referenced by InstrumentationBindings.cpp >>> $WORK/b048/_x018.o:(void __gnu_cxx::new_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::destroy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string() >>> referenced by SupportBindings.cpp >>> $WORK/b048/_x019.o:(LLVMLoadLibraryPermanently2) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const >>> referenced by SupportBindings.cpp >>> $WORK/b048/_x019.o:(LLVMLoadLibraryPermanently2) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const >>> referenced by SupportBindings.cpp >>> $WORK/b048/_x019.o:(LLVMLoadLibraryPermanently2) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const >>> referenced by SupportBindings.cpp >>> $WORK/b048/_x019.o:(LLVMLoadLibraryPermanently2) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() >>> referenced by SupportBindings.cpp >>> $WORK/b048/_x019.o:(LLVMLoadLibraryPermanently2) ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() >>> referenced by SupportBindings.cpp >>> $WORK/b048/_x019.o:(LLVMLoadLibraryPermanently2) ld.lld: error: undefined symbol: llvm::sys::DynamicLibrary::getPermanentLibrary(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) >>> referenced by SupportBindings.cpp >>> $WORK/b048/_x019.o:(llvm::sys::DynamicLibrary::LoadLibraryPermanently(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)) ld.lld: error: undefined symbol: __asan_option_detect_stack_use_after_return >>> referenced by MCJIT.cpp:45 (/usr/local/google/home/mitchp/llvm/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp:45) >>> MCJIT.cpp.o:(llvm::MCJIT::createJIT(std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::shared_ptr<llvm::MCJITMemoryManager>, std::__1::shared_ptr<llvm::LegacyJITSymbolResolver>, std::__1::unique_ptr<llvm::TargetMachine, std::__1::default_delete<llvm::TargetMachine> >)) in archive /usr/local/google/home/mitchp/llvm-build/asan/sanitized-clang/lib/libLLVMMCJIT.a ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) clang-9: error: linker command failed with exit code 1 (use -v to see invocation) -- ``` llvm-svn: 355749
* Fix go bindings test when using goma distributed build toolReid Kleckner2018-03-261-1/+1
| | | | | | | | | | | | | | | Goma[1] is a distributed build system similar to distcc and icecc primarily used to compile Chromium. The client is open source, and hopefully soon the server will be as well. The intended usage model is similar to most distributed build systems: prefix gomacc onto your compiler command line, and it transparently distributes compilation. The go lit config wants to determine the host compiler binary, so it needs some extra logic to avoid looking at these prefixes. [1] https://chromium.googlesource.com/infra/goma/client/ llvm-svn: 328580
* [cmake] Canonicalize CMake booleans to 0/1 for lit interopMichal Gorny2017-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Canonicalize all CMake booleans to 0/1 before passing them to lit, to ensure that the Python side handles all of them consistently and correctly. 0/1 is a safe choice of values that trigger the same boolean interpretation in CMake, Python and C++. Furthermore, using them without quotes improves the chance Python will explicitly fail when an incorrect value (such as ON/OFF, TRUE/FALSE, YES/NO) is accidentally passed, rather than silently misinterpreting the value. This replaces a lot of different logics spread around lit site files, attempting to partially reproduce the boolean logic used in CMake and usually silently failing when an uncommon value was used instead. In fact, some of them were never working correctly since different values were assigned in CMake and checked in Python. The alternative solution could be to create a common parser for CMake booleans in lit and use it consistently throughout the site files. However, it does not seem like the best idea to create redundant implementation of the same logic and have to follow upstream if it ever is extended to handle more values. Differential Revision: https://reviews.llvm.org/D28294 llvm-svn: 291284
* Disable Go bindings test with MSan, it has tons of linker errorsReid Kleckner2015-11-191-1/+1
| | | | llvm-svn: 253525
* Add a way to skip the Go bindings tests even when Go is configured inChandler Carruth2015-09-101-0/+3
| | | | | | | | | | | | | CMake. The Go bindings tests in an unoptimized build take over 30 seconds for me, making it the slowest test in 'check-llvm' by a factor of two. I've only rigged this up fully to the CMake build. If someone is interested in rigging it up to the autoconf build, they're welcome to do so. llvm-svn: 247243
* Disable Go bindings test under UBSan.Alexey Samsonov2015-01-091-1/+1
| | | | llvm-svn: 225557
* Add llvm-go tool.Peter Collingbourne2014-10-231-6/+1
| | | | | | | | | | | | This tool lets us build LLVM components within the tree by setting up a $GOPATH that resembles a tree fetched in the normal way with "go get". It is intended that components such as the Go frontend will be built in-tree using this tool. Differential Revision: http://reviews.llvm.org/D5902 llvm-svn: 220462
* Teach lit to filter the host LDFLAGS down from the build system and intoChandler Carruth2014-10-212-1/+2
| | | | | | | | | | the CGO build environment. This lets things like -rpath propagate down to the C++ code that is built along side the Go bindings when testing them. Patch by Peter Collingbourne, and verified that it works by me. llvm-svn: 220252
* Disable ccache for go tests.Peter Collingbourne2014-10-171-0/+5
| | | | | | Should fix llvm-clang-lld-x86_64-debian-fast bot. llvm-svn: 220071
* We also need to catch OSError here.Peter Collingbourne2014-10-171-2/+2
| | | | llvm-svn: 220058
* Don't crash if find_executable return None.Rafael Espindola2014-10-171-4/+4
| | | | | | This was crashing when trying to run the tests on Windows. llvm-svn: 220048
* Add our own copy of the find_executable function to cope with installationsPeter Collingbourne2014-10-161-2/+20
| | | | | | | that do not have the distutils.spawn package. Should hopefully fix the aarch64 buildbot. llvm-svn: 219991
* Initial version of Go bindings.Peter Collingbourne2014-10-162-0/+41
This code is based on the existing LLVM Go bindings project hosted at: https://github.com/go-llvm/llvm Note that all contributors to the gollvm project have agreed to relicense their changes under the LLVM license and submit them to the LLVM project. Differential Revision: http://reviews.llvm.org/D5684 llvm-svn: 219976
OpenPOWER on IntegriCloud