Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass --sdk to dependencies #5918

Merged
merged 1 commit into from
Dec 2, 2024
Merged

Pass --sdk to dependencies #5918

merged 1 commit into from
Dec 2, 2024

Conversation

UE4SS
Copy link
Contributor

@UE4SS UE4SS commented Dec 2, 2024

This fixes #5917.
This is my first pull request for this project, please let me know if there's anything missing or if I did something wrong.

@waruqi
Copy link
Member

waruqi commented Dec 2, 2024

We don't always pass the sdk, it's only required for cross-compilation and toolchains like mingw. what's your toolchain and platform?

local sdkdir = _get_config_from_toolchains(package, "sdkdir") or get_config("sdk")

local sdkdir = _get_config_from_toolchains(package, "sdkdir") or get_config("sdk")

@UE4SS
Copy link
Contributor Author

UE4SS commented Dec 2, 2024

We don't always pass the sdk, it's only required for cross-compilation and toolchains like mingw. what's your toolchain and platform?

local sdkdir = _get_config_from_toolchains(package, "sdkdir") or get_config("sdk")

local sdkdir = _get_config_from_toolchains(package, "sdkdir") or get_config("sdk")

I'm using msvc-wine and host is Arch Linux.

@waruqi
Copy link
Member

waruqi commented Dec 2, 2024

you should add it in _get_configs_for_windows()

function _get_configs_for_windows()
    if not is_host("windows") then
        -- pass sdk
    end
end

@UE4SS
Copy link
Contributor Author

UE4SS commented Dec 2, 2024

you should add it in _get_configs_for_windows()

function _get_configs_for_windows()
    if not is_host("windows") then
        -- pass sdk
    end
end

This makes sense, I've applied the changes.

@@ -89,6 +89,13 @@ function _get_configs_for_windows(package, configs, opt)
if package:config("toolchains") and _is_toolchain_compatible_with_host(package) then
_get_configs_for_host_toolchain(package, configs, opt)
end

if not is_host("windows") then
local sdk = get_config("sdk")
Copy link
Member

Choose a reason for hiding this comment

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

local sdkdir = _get_config_from_toolchains(package, "sdkdir") or get_config("sdk")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, your original message was too ambiguous for me to pick up on the requested change.

@waruqi waruqi added this to the v2.9.7 milestone Dec 2, 2024
@waruqi waruqi merged commit 3a7e44a into xmake-io:dev Dec 2, 2024
19 checks passed
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.

Dependencies should inherit --sdk
2 participants