Skip to content

Conversation

@kekxv
Copy link
Contributor

@kekxv kekxv commented Sep 10, 2025

add windows

…pecific settings, source overlay, and presubmit tasks
@bazel-io
Copy link
Member

Hello @feuerste, modules you maintain (libffi) have been updated in this PR.
Please review the changes. You can view a diff against the previous version in the "Generate module diff" check.

Copy link
Contributor

@feuerste feuerste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kekxv!

Comment on lines 180 to 194
cc_library(
name = "libffi",
visibility = ["//visibility:public"],
deps = select({
":windows_x86_32": [
"@libffi-x86-32bit-msvc-binaries//:libffi",
],
":windows_x86_64": [
"@libffi-x86-64bit-msvc-binaries//:libffi",
],
"//conditions:default": [
":libffi-unix",
],
}),
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just using an alias instead?

alias(
    name = "libffi",
    visibility = ["//visibility:public"],
    actual = select({
        ":windows_x86_32": [
            "@libffi-x86-32bit-msvc-binaries//:libffi",
        ],
        ":windows_x86_64": [
            "@libffi-x86-64bit-msvc-binaries//:libffi",
        ],
        "//conditions:default": [
            ":libffi-unix",
        ],
    }),
)

""",
sha256 = "3f218abf32c765a6229ecc04d83d67e90266025e3f79b752358771119d02d8fb",
strip_prefix = "",
urls = ["https://github.com/libffi/libffi/releases/download/v3.5.2/libffi-3.5.2-x86-64bit-msvc-binaries.zip"],
Copy link
Contributor

@feuerste feuerste Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version doesn't match the module version. Please either use the corresponding version or update the module version.

Comment on lines +12 to +44
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "libffi-x86-64bit-msvc-binaries",
build_file_content = """
cc_import(
name = "libffi",
hdrs = ["ffi.h","ffitarget.h"],
interface_library = "libffi-8.lib",
shared_library = "libffi-8.dll",
visibility = ["//visibility:public"],
)
""",
sha256 = "3f218abf32c765a6229ecc04d83d67e90266025e3f79b752358771119d02d8fb",
strip_prefix = "",
urls = ["https://github.com/libffi/libffi/releases/download/v3.5.2/libffi-3.5.2-x86-64bit-msvc-binaries.zip"],
)

http_archive(
name = "libffi-x86-32bit-msvc-binaries",
build_file_content = """
cc_import(
name = "libffi",
hdrs = ["ffi.h","ffitarget.h"],
interface_library = "libffi-8.lib",
shared_library = "libffi-8.dll",
visibility = ["//visibility:public"],
)
""",
sha256 = "73dd4bcdd533fb7dc28758026f369c6b914a59f4e71e87ddb66beff973a267d2",
strip_prefix = "",
urls = ["https://github.com/libffi/libffi/releases/download/v3.5.2/libffi-3.5.2-x86-32bit-msvc-binaries.zip"],
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be much preferred to build from source on Windows as well. How much effort would this be?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to make it support Windows.

@kekxv kekxv marked this pull request as draft September 10, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants