Skip to content

Convert source paths to Windows format path#562

Open
medranocalvo wants to merge 2 commits into
libffi:masterfrom
medranocalvo:patch-1
Open

Convert source paths to Windows format path#562
medranocalvo wants to merge 2 commits into
libffi:masterfrom
medranocalvo:patch-1

Conversation

@medranocalvo
Copy link
Copy Markdown

This is needed for cross building libffi for Windows under Cygwin.

@atgreen
Copy link
Copy Markdown
Member

atgreen commented May 1, 2020

I'm not sure we can be positive that cygpath is always available, can we? Can this be changed to support the case where cygpath isn't available?

@medranocalvo
Copy link
Copy Markdown
Author

Thank you for your review.

The script assumes Cygwin (e.g.: https://github.com/libffi/libffi/blob/master/msvcc.sh#L168-L185).

Your proposal might make sense in order to support WSL. I can't test it, though.

Please check f73c4ea, which works under Cygwin.

@medranocalvo
Copy link
Copy Markdown
Author

The build failure seems unrelated to the changes:

Build execution time has reached the maximum allowed time for your plan (60 minutes).

Could you verify?

@tresf
Copy link
Copy Markdown
Contributor

tresf commented Nov 11, 2020

Somewhat related... Working with cygwin from cmd, I find issues with improper quoting as illustrated here: java-native-access/jna@112d76d. Specifically, there are relative includes (e.g. ./) which cl.exe is unaware of as well as paths such as C:\Program Files\AdoptOpenJDK\..\include which aren't properly quoted and break command-line invocation.

Your proposal might make sense in order to support WSL

Apparently wslpath is a thing? microsoft/WSL#522 (comment)

MSYS2 would also benefit from such a tool although the MSYS1 documentation states it does it automatically?

"For any executable not dependent on msys-1.0.dll, MSYS will convert POSIX paths that are used as arguments to Win32 paths. This page attempts to document the heuristics MSYS uses to decide which arguments are POSIX paths and how they should be converted based on the source of msys_p2w in path.cc."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants