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

Adjust search mingw32 lib search to support llvm-mingw32 compiler. #1138

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

RussellHaley
Copy link

Hello,

As per #1135, I was able to get the llvm-mingw32 toolchain to work with luarocks. I'm not sure why the mingw32 internal build script doesn't respect variables.LUALIB from the config file, but the fix is minor. I simply adjusted the search path as provided by cfg.lua. I moved the ?.lib search string to the front of the table definition. I don't expect this to affect mingw32-gcc, but that's a guess (based on an old faded memory) on my part. I suspect it either doesn't generate lib files (so won't find it in a search string) or is agnostic of their use. I'm indifferent to leaving the comment in (e.g. take it out if you feel). I thought it appropriate given there was an opposing comment there before.

--~ 2020-01-23: putting ?.lib first allows use of the llvm-mingw32 compiler toolchain
--~ https://github.com/mstorsjo/llvm-mingw
--~ The LLVM linker doesn't support linking to a dll (GNU ld does).
lib = { "?.lib", "lib?.dll.a", "?.dll.a", "lib?.a", "cyg?.dll", "lib?.dll", "?.dll" },
Copy link
Member

Choose a reason for hiding this comment

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

Is there a way to check that this change does not affect non-LLVM mingw32 in some way? Not sure if the testsuite (and the CI run for spec/build_spec.lua in Appveyor) covers it.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure if the testsuite (and the CI run for spec/build_spec.lua in Appveyor) covers it.

I think there may be a chance it does, in the very latest code of master. You might want to rebase this PR over the latest origin/master and force-push it so we get a new CI run.

Copy link
Member

Choose a reason for hiding this comment

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

On deeper inspection, I don't think the test suite actually checks that the build of a module with an external dependency works correctly (i.e. that it produces a module that the Lua interpreter is really able to load and use). I'm reluctant about merging this before further testing, I can try my hand at extending the tests (probably next week).

Copy link
Author

Choose a reason for hiding this comment

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

I got a build working last night so I can move forward and test; no rush on up-streaming it. What platform are you concerned about? Windows, Linux?

@codecov-io
Copy link

Codecov Report

Merging #1138 into master will increase coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1138     +/-   ##
=========================================
+ Coverage    85.3%   85.41%   +0.1%     
=========================================
  Files          94       94             
  Lines       11304    11325     +21     
=========================================
+ Hits         9643     9673     +30     
+ Misses       1661     1652      -9
Impacted Files Coverage Δ
src/luarocks/deps.lua 91.51% <100%> (+0.87%) ⬆️
src/luarocks/build.lua 85.82% <100%> (-1.58%) ⬇️
src/luarocks/core/cfg.lua 88.09% <100%> (+3.89%) ⬆️
src/luarocks/core/manif.lua 92.72% <0%> (-7.28%) ⬇️
src/luarocks/fetch/git.lua 59.21% <0%> (-3.95%) ⬇️
src/luarocks/fs/lua.lua 85.09% <0%> (-1.18%) ⬇️
src/luarocks/tools/patch.lua 84.39% <0%> (-0.95%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4ac869...4353724. Read the comment docs.

@hishamhm
Copy link
Member

hishamhm commented Jan 28, 2020 via email

- .gitignore - updated to include windows binary build outputs.
- all_in_one - changed default path for external dependencies (e.g. mingw)
- binary/lua-bz2-0.1.0-1.rockspec - changed protocol for anonymous download
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.

None yet

3 participants