[libhandy/msvc-1-6: 7/15] test/meson.build: Don't use PIE/PIC for MSVC-like compilers
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/msvc-1-6: 7/15] test/meson.build: Don't use PIE/PIC for MSVC-like compilers
- Date: Tue, 19 Jul 2022 09:45:21 +0000 (UTC)
commit 71d97a1cc55e8b0c8281b2b0ec418cb6a34248a7
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Jul 26 18:55:43 2021 +0800
test/meson.build: Don't use PIE/PIC for MSVC-like compilers
It's not supported nor needed.
tests/meson.build | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/tests/meson.build b/tests/meson.build
index 143bd6e0..7c603da5 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -14,9 +14,13 @@ test_cflags = [
'-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()),
]
-test_link_args = [
- '-fPIC',
-]
+test_link_args = []
+use_pie = false
+
+if cc.get_argument_syntax() != 'msvc'
+ test_link_args += '-fPIC'
+ use_pie = true
+endif
test_names = [
'test-action-row',
@@ -56,7 +60,7 @@ foreach test_name : test_names
c_args: test_cflags,
link_args: test_link_args,
dependencies: libhandy_deps + [libhandy_dep],
- pie: true,
+ pie: use_pie,
)
test(test_name, t, env: test_env)
endforeach
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]