How can we configure linux specific linker options...
# amper
s
How can we configure linux specific linker options in Amper?
I have a common module template with the following config, but somehow the linker options aren’t being picked up when creating the linux release build.
Copy code
settings:
  kotlin:
    languageVersion: 2.2
    progressiveMode: true
    allWarningsAsErrors: true
    suppressWarnings: false
    verbose: false
    freeCompilerArgs:
     ...
    optIns:
      - kotlin.ExperimentalStdlibApi
      - kotlin.ExperimentalUnsignedTypes
      -...

settings@jvm:
  kotlin:
    freeCompilerArgs:
      - -Xjdk-release=21
      -...

settings@native:
  kotlin:
    optIns:
      - kotlinx.cinterop.ExperimentalForeignApi
      - kotlin.experimental.ExperimentalNativeApi

settings@linux:
  kotlin:
    linkerOpts: [
      "-Wl,--as-needed",
      "-Wl,-Bstatic",
      "-lz",
      "-Wl,-Bdynamic"
    ]
j
This is the correct way to specify it. However, it seems that
settings.kotlin.linkerOpts
was added during the era of Gradle-based Amper, and was never implemented in the standalone Amper build tool 😯 Sorry about this, and thanks for finding another bug. https://youtrack.jetbrains.com/issue/AMPER-4571/settings.kotlin.linkerOpts-is-not-taken-into-account
thank you color 1