rrn/rd/KT-55578 User-provided hints for linker errors

[K/N] KT-55578 Show customized user suggestions on linkage errors

Merge-request: KT-MR-9636
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com>
This commit is contained in:
Gleb Lukianets
2023-04-27 14:14:43 +00:00
committed by Space Team
parent 1e0115aef8
commit 242ca73d83
18 changed files with 368 additions and 11 deletions
@@ -0,0 +1,10 @@
headerFilter = **/userSetupHint.h
userSetupHint = 🤌\t\u2115ever put ketchup on-a 🍝\
\n = `\u2115` = "\u2115" = \\u2115\
\n🇮🇹
---
void foo();
void test() {
foo();
}
@@ -0,0 +1,10 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import userSetupFancyHint.*
fun userSetupHint(args: Array<String>) {
test()
}
@@ -0,0 +1,7 @@
#include <stdio.h>
#ifdef __cplusplus
#define EXPORT extern "C"
#else
#define EXPORT
#endif
@@ -0,0 +1,12 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import userSetupHint1.*
import userSetupHint2.*
fun userSetupHint(args: Array<String>) {
testFoo()
testBar()
}
@@ -0,0 +1,5 @@
#import "userSetupHint.h"
EXPORT void foo() {
// this just needs to exist
}
@@ -0,0 +1,8 @@
headerFilter = **/userSetupHint.h
userSetupHint = <<HINT1>>
---
void foo(void);
void testFoo() {
foo();
}
@@ -0,0 +1,5 @@
#import "userSetupHint.h"
EXPORT void bar() {
// this just needs to exist
}
@@ -0,0 +1,8 @@
headerFilter = **/userSetupHint.h
userSetupHint = <<HINT2>>
---
void bar(void);
void testBar() {
bar();
}
@@ -0,0 +1,5 @@
headerFilter = **/userSetupHint.h
userSetupHint = <<HINT_MISSING_LIBRARY>>
linkerOpts = -lNonExistant
---
void test() { }
@@ -0,0 +1,5 @@
import userSetupHintLinkingMissingLibrary.*
fun userSetupHint(args: Array<String>) {
test()
}
@@ -0,0 +1,7 @@
headerFilter = **/userSetupHint.h
---
void foo(void);
void test() {
foo();
}
@@ -0,0 +1,10 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import userSetupNoHint.*
fun userSetupHint(args: Array<String>) {
test()
}