2016-01-03 23:55:40 +08:00
|
|
|
// Test if mingw toolchain driver emits static linking (-lgcc -lgcc_eh) or dynamic linking (-lgcc_s -lgcc).
|
|
|
|
// Verified with gcc version 5.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project).
|
|
|
|
|
|
|
|
// gcc, static
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: %clang -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
|
|
|
|
// RUN: %clang -static -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
|
|
|
|
// RUN: %clang -static-libgcc -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
|
|
|
|
// RUN: %clang -static -shared -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
|
|
|
|
// RUN: %clang -static-libgcc -shared -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
|
2016-01-03 23:55:40 +08:00
|
|
|
|
|
|
|
// gcc, dynamic
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: %clang -shared -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_DYNAMIC %s
|
2016-01-03 23:55:40 +08:00
|
|
|
|
|
|
|
// g++, static
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: %clang -static --driver-mode=g++ -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
|
|
|
|
// RUN: %clang -static-libgcc --driver-mode=g++ -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
|
|
|
|
// RUN: %clang -static -shared --driver-mode=g++ -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
|
|
|
|
// RUN: %clang -static-libgcc -shared --driver-mode=g++ -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
|
2016-01-03 23:55:40 +08:00
|
|
|
|
|
|
|
// g++, dynamic
|
2016-07-27 16:15:54 +08:00
|
|
|
// RUN: %clang --driver-mode=g++ -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_DYNAMIC %s
|
|
|
|
// RUN: %clang -shared --driver-mode=g++ -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_DYNAMIC %s
|
2016-01-03 23:55:40 +08:00
|
|
|
|
|
|
|
// CHECK_STATIC: "-lgcc" "-lgcc_eh"
|
|
|
|
// CHECK_DYNAMIC: "-lgcc_s" "-lgcc"
|