diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2015-08-14 17:17:51 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2015-08-18 17:59:52 +0000 |
commit | 493240b0556e8f2a69926a990e4c5b28c85be288 (patch) | |
tree | 48b8b8a75e4ce115985ba3e5c349c4b453a081b1 /tests/auto/blackbox/testdata/ld | |
parent | 1f6e703a128d0925f63045258cea175840118967 (diff) |
Escape linker flags depending on the linker binary in use.
This helps abstract away the -Wl, prefix when using the compiler driver
to invoke the linker instead of using ld directly as we may eventually
support.
Change-Id: I47265d29d162f51e9a65190bd5244c8619b55dc7
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'tests/auto/blackbox/testdata/ld')
-rw-r--r-- | tests/auto/blackbox/testdata/ld/coreutils.cpp | 6 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/ld/coreutils.h | 4 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/ld/ld.qbs | 22 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/ld/main.cpp | 8 |
4 files changed, 40 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/ld/coreutils.cpp b/tests/auto/blackbox/testdata/ld/coreutils.cpp new file mode 100644 index 000000000..f66904af7 --- /dev/null +++ b/tests/auto/blackbox/testdata/ld/coreutils.cpp @@ -0,0 +1,6 @@ +#include "coreutils.h" + +int foo() +{ + return 42; +} diff --git a/tests/auto/blackbox/testdata/ld/coreutils.h b/tests/auto/blackbox/testdata/ld/coreutils.h new file mode 100644 index 000000000..e12e23c49 --- /dev/null +++ b/tests/auto/blackbox/testdata/ld/coreutils.h @@ -0,0 +1,4 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int foo(); diff --git a/tests/auto/blackbox/testdata/ld/ld.qbs b/tests/auto/blackbox/testdata/ld/ld.qbs new file mode 100644 index 000000000..b63edec2a --- /dev/null +++ b/tests/auto/blackbox/testdata/ld/ld.qbs @@ -0,0 +1,22 @@ +import qbs + +Project { + Library { + Depends { name: "cpp" } + name: "coreutils" + targetName: "qbs can handle any file paths, even the crazy ones! ;)" + files: ["coreutils.cpp", "coreutils.h"] + bundle.isBundle: false + cpp.installNamePrefix: "@rpath" + + Group { + fileTagsFilter: product.type + qbs.install: true + } + } + + CppApplication { + Depends { name: "coreutils" } + files: ["main.cpp"] + } +} diff --git a/tests/auto/blackbox/testdata/ld/main.cpp b/tests/auto/blackbox/testdata/ld/main.cpp new file mode 100644 index 000000000..ee1055efd --- /dev/null +++ b/tests/auto/blackbox/testdata/ld/main.cpp @@ -0,0 +1,8 @@ +#include "coreutils.h" +#include <stdio.h> + +int main(int argc, char *argv[]) +{ + printf("%d\n", foo()); + return 0; +} |