Commit Graph

22 Commits

Author SHA1 Message Date
Marcos Pividori cc709cebc8 [windows] Fix test for cl driver.
cl-link.c test was failing after r294604 because of the change in the order of
parameters.

llvm-svn: 294609
2017-02-09 18:40:52 +00:00
Marcos Pividori bd99882cf2 [windows] [asan] Fix tests failing after 293668.
llvm-svn: 293676
2017-01-31 19:05:05 +00:00
Marcos Pividori b130469bc9 [windows] [asan] Add linker flag when including "asan_dynamic_runtime_thunk".
I modify clang driver for windows to include:
"-wholearchive:asan_dynamic_runtime_thunk", so all object files in the
static library: asan_dynamic_runtime_thunk are considered by the linker.
This is necessary, because some object files only include linker pragmas,
and doesn't resolve any symbol. If we don't include that flag, the
linker will ignore them, and won't read the linker pragmas.

Differential Revision: https://reviews.llvm.org/D29159

llvm-svn: 293420
2017-01-29 06:03:05 +00:00
Hans Wennborg 2b0eea4a3b clang-cl: expose the -fuse-ld option
llvm-svn: 283256
2016-10-04 21:01:00 +00:00
Hans Wennborg 12f4f8be90 clang-cl: Don't check for existence of linker inputs when /link is used
There might be flags passed to the linker (e.g. /libpath), causing it
to search in paths the Clang driver doesn't know about.

PR27234

llvm-svn: 266402
2016-04-15 01:12:32 +00:00
Hans Wennborg 84ff1d37fc clang-cl: Make /link accept an optional joined argument.
For example, "cl.exe a.c /linkfoo bar" is a valid invocation and
forwards "foo" and "bar" to link.exe. This makes clang-cl handle
that kind of invocation.

Depends on LLVM r266394.

llvm-svn: 266395
2016-04-15 00:24:15 +00:00
Yaron Keren b1db6e888b Erase REQUIRES: shell-preserves-root from more tests, see r242312.
llvm-svn: 242321
2015-07-15 19:42:18 +00:00
Peter Collingbourne f58ff5b09d Specify --target, hopefully fixing non-x86 bots.
llvm-svn: 241248
2015-07-02 09:10:31 +00:00
Peter Collingbourne c3ca6e563b Specify -arch:IA32. Should fix hexagon bot.
llvm-svn: 241229
2015-07-02 02:14:50 +00:00
Peter Collingbourne 581f438f4c Driver: add support for linking the UBSan runtime library on Windows.
On Windows the user may invoke the linker directly, so we might not have an
opportunity to add runtime library flags to the linker command line. Instead,
instruct the code generator to embed linker directive in the object file
that cause the required runtime libraries to be linked.

We might also want to do something similar for ASan, but it seems to have
its own special complexities which may make this infeasible.

Differential Revision: http://reviews.llvm.org/D10862

llvm-svn: 241225
2015-07-02 01:48:12 +00:00
Timur Iskhodzhanov 651725e191 [ASan/Win] Fix PR20918 -- SEH handler doesn't work with the MD runtime
llvm-svn: 217679
2014-09-12 14:01:30 +00:00
Timur Iskhodzhanov 7083c0e02e Update the test case after r217673
Sorry, committing to multiple repos at once is hard...

llvm-svn: 217677
2014-09-12 13:47:44 +00:00
Timur Iskhodzhanov 6903e10ddf [ASan/Win] Add an extra thunk.lib to handle stack-use-after-return option
With this patch, "check-asan" passes all the tests with both MT and MD ASan RTL if you set COMPILER_RT_BUILD_SHARED_ASAN to ON
(PR20214)

llvm-svn: 216447
2014-08-26 10:08:24 +00:00
Alexey Samsonov 6424e02fb2 [ASan] Fixup for r208610: link in asan_cxx library on Windows
llvm-svn: 208625
2014-05-12 20:20:20 +00:00
Hans Wennborg bbb5f07626 clang-cl: pass -debug flag to the linker when compiling with debug info
llvm-svn: 207233
2014-04-25 16:24:19 +00:00
Timur Iskhodzhanov 3b6adcb63a Fix the ASan dll_thunk path
llvm-svn: 190516
2013-09-11 11:45:31 +00:00
Hans Wennborg 4e6bec7e26 Fix cl-link.c test failure on Mac platforms
The test filename (%s) is easily confused with an option when
it starts with /Users...

llvm-svn: 190435
2013-09-10 20:53:34 +00:00
Hans Wennborg f1a7425bd9 clang-cl: Support building DLLs (PR17083)
This adds driver support for building DLLs (the /LD and /LDd flags).
It basically does two things: runtime selection and passing -dll and
-implib to the linker.

llvm-svn: 190428
2013-09-10 20:18:04 +00:00
Hans Wennborg d024c1c803 clang-cl: Pass -incremental:no to linker when using ASan
llvm-svn: 189664
2013-08-30 10:50:52 +00:00
Hans Wennborg 0517e75164 clang-cl: Pass -debug to the linker when using -fsanitize=address
llvm-svn: 189496
2013-08-28 17:36:07 +00:00
Hans Wennborg 65f1752875 clang-cl: Support -fsanitize=address
This exposes the -fsanitize=address option and adds the runtime library
to the link command.

Differential Revision: http://llvm-reviews.chandlerc.com/D1526

llvm-svn: 189389
2013-08-27 18:10:21 +00:00
Hans Wennborg 2e27459d6c clang-cl: Support /link option and set target to win32
This adds support for the /link option, which forwards
subsequent arguments to the linker.

The test for this will only work when targetting win32.
Since that's the only target where clang-cl makes sense,
use that target by default.

Differential Revision: http://llvm-reviews.chandlerc.com/D1388

llvm-svn: 188331
2013-08-13 23:38:57 +00:00