func applyBuildParameters(_ parameters: inout Parameters) { // NOTE: We only support static linking for now, and the new SwiftDriver // does not infer `-static-stdlib` for WebAssembly targets intentionally // for future dynamic linking support. parameters.otherSwiftcFlags += ["-static-stdlib"] switch self { case .command: break case .node, .browser: parameters.otherSwiftcFlags += ["-Xclang-linker", "-mexec-model=reactor"] #if compiler(>=6.0) || compiler(>=5.11) parameters.otherLinkerFlags += ["--export-if-defined=__main_argc_argv"] #else // Before Swift 6.0, the main function is defined as "main" instead of mangled "__main_argc_argv" parameters.otherLinkerFlags += ["--export-if-defined=main"] #endif } }
テストから叩くならこのcompiler directiveが問題になるなw