Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:

jobs:
commitlint:
runs-on: ubuntu-slim
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v6
Expand Down
3 changes: 0 additions & 3 deletions .gnfiles/build/platform/win/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ config("specific_cpp_mingw") {
} else {
cflags_cc += [ "-fno-exceptions" ]
}

# Link against C++ standard library
libs = [ "stdc++" ]
}


Expand Down
22 changes: 16 additions & 6 deletions .gnfiles/build/toolchain/mingw/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ config("debug") {
cflags = [ "-g" ]
cflags_cc = []
ldflags = [
"-static-libgcc", # Static link libgcc (avoids libgcc_s_seh-1.dll)
"-static-libstdc++", # Static link libstdc++ (avoids libstdc++-6.dll)
"-static", # Static link MinGW runtime including pthread (avoids libwinpthread-1.dll)
# Note: Do NOT use -static here, as it prevents linking with .dll.a import libraries
# (ten_runtime and ten_utils)
# Instead, use -Wl,-Bstatic/-Bdynamic to selectively static link libraries
"-Wl,-Bstatic",
"-lgcc", # Static link libgcc (avoids libgcc_s_seh-1.dll)
"-lstdc++", # Static link libstdc++ (avoids libstdc++-6.dll)
"-lpthread", # Static link pthread (avoids libwinpthread-1.dll)
"-Wl,-Bdynamic", # Switch back to dynamic linking for other libraries
]
libs = default_libs
}
Expand All @@ -62,9 +67,14 @@ config("release") {
cflags_cc = []
ldflags = [
"-Wl,-O2",
"-static-libgcc",
"-static-libstdc++",
"-static",
# Note: Do NOT use -static here, as it prevents linking with .dll.a import libraries
# (ten_runtime and ten_utils)
# Instead, use -Wl,-Bstatic/-Bdynamic to selectively static link libraries
"-Wl,-Bstatic",
"-lgcc", # Static link libgcc (avoids libgcc_s_seh-1.dll)
"-lstdc++", # Static link libstdc++ (avoids libstdc++-6.dll)
"-lpthread", # Static link pthread (avoids libwinpthread-1.dll)
"-Wl,-Bdynamic", # Switch back to dynamic linking for other libraries
]
libs = default_libs
}
Expand Down
6 changes: 5 additions & 1 deletion .gnfiles/build/toolchain/mingw/mingw.gni
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,14 @@ template("mingw_toolchain") {
tool("solink") {
soname = "{{target_output_name}}{{output_extension}}"
sofile = "{{output_dir}}/$soname"

# Import library extension matches output extension for consistency
# e.g., .dll -> .dll.a, .pyd -> .pyd.a
implibname = "{{target_output_name}}{{output_extension}}.a"
# MinGW import libraries require 'lib' prefix for GNU linker compatibility:
# GNU ld expects libfoo.dll.a when using -lfoo flag.
implibname = "lib{{target_output_name}}{{output_extension}}.a"
implibfile = "{{output_dir}}/$implibname"

rspfile = sofile + ".rsp"
pool = "//.gnfiles/build/toolchain:link_pool"

Expand Down