Replace '@' with '_' in binary symbol names.
'@' symbol is used for symbol versioning in GCC which leads to compilation errors in case of compiler caches usage.
This commit is contained in:
committed by
Stanislav Erokhin
parent
56683ef403
commit
54f70a68a2
+7
-3
@@ -116,11 +116,15 @@ fun IrFunction.computeFunctionName() = with(KonanBinaryInterface) { functionName
|
|||||||
|
|
||||||
fun IrFunction.computeFullName() = parent.fqNameForIrSerialization.child(Name.identifier(computeFunctionName())).asString()
|
fun IrFunction.computeFullName() = parent.fqNameForIrSerialization.child(Name.identifier(computeFunctionName())).asString()
|
||||||
|
|
||||||
fun IrFunction.computeSymbolName() = with(KonanBinaryInterface) { symbolName }
|
fun IrFunction.computeSymbolName() = with(KonanBinaryInterface) { symbolName }.replaceSpecialSymbols()
|
||||||
|
|
||||||
fun IrField.computeSymbolName() = with(KonanBinaryInterface) { symbolName }
|
fun IrField.computeSymbolName() = with(KonanBinaryInterface) { symbolName }.replaceSpecialSymbols()
|
||||||
|
|
||||||
fun IrClass.computeTypeInfoSymbolName() = with(KonanBinaryInterface) { typeInfoSymbolName }
|
fun IrClass.computeTypeInfoSymbolName() = with(KonanBinaryInterface) { typeInfoSymbolName }.replaceSpecialSymbols()
|
||||||
|
|
||||||
|
private fun String.replaceSpecialSymbols() =
|
||||||
|
// '@' is used for symbol versioning in GCC: https://gcc.gnu.org/wiki/SymbolVersioning.
|
||||||
|
this.replace("@", "__at__")
|
||||||
|
|
||||||
fun IrDeclaration.isExported() = KonanBinaryInterface.isExported(this)
|
fun IrDeclaration.isExported() = KonanBinaryInterface.isExported(this)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user