Skip to content

Commit

Permalink
link RegexParser
Browse files Browse the repository at this point in the history
  • Loading branch information
omochi committed Jun 10, 2024
1 parent b5d38d0 commit abc765c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/CartonCore/Environment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ public enum Environment: String, CaseIterable {
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"]
parameters.otherLinkerFlags += [
"--export-if-defined=__main_argc_argv",
"-lswift_RegexParser"
]
#else
// Before Swift 6.0, the main function is defined as "main" instead of mangled "__main_argc_argv"
parameters.otherLinkerFlags += ["--export-if-defined=main"]
Expand Down

0 comments on commit abc765c

Please sign in to comment.