From ff501241614b1f4e80429c596555591a289d416e Mon Sep 17 00:00:00 2001 From: LepilkinaElena Date: Wed, 3 Apr 2019 11:57:13 +0300 Subject: [PATCH] Fix test for different linkers. (#2844) --- backend.native/tests/build.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index 2fc84852e89..31eb5fe19d3 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -2895,10 +2895,16 @@ task inline_defaultArgs_linkTest(type: LinkKonanTest) { } def generateWithSpaceDefFile() { + def mapOption = "--Map " + if (isAppleTarget(project)) { + mapOption = "-map " + } else if (isWindowsTarget(project)) { + mapOption = "-Wl,--Map," + } def file = new File("${buildDir}/withSpaces.def") file.write """ headers = stdio.h "${projectDir}/interop/basics/custom headers/custom.h" -linkerOpts = -map "${buildDir}/cutom map.map" +linkerOpts = $mapOption "${buildDir}/cutom map.map" --- int customCompare(const char* str1, const char* str2) {