-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
[experimental] build lld on appveyor #286
Conversation
Thanks for your pull request, @rainers! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
closing for now, trying it on a different account |
Seems to work now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good.
windows/build_lld.bat
Outdated
|
||
call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" | ||
git clone --depth 1 --branch %LLVM_BRANCH% https://github.com/llvm-mirror/llvm.git llvm || exit /B 1 | ||
git clone --depth 1 --branch %LLVM_BRANCH% https://github.com/llvm-mirror/lld.git llvm\tools\lld || exit /B 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather go with the released sources, then we also have proper versioning.
http://releases.llvm.org/download.html#5.0.1
http://releases.llvm.org/5.0.1/lld-5.0.1.src.tar.xz
http://releases.llvm.org/5.0.1/llvm-5.0.1.src.tar.xz
Bonus, check gpg signatures locally and put the sha256sums in the script (prolly simpler than gpg on window).
d5b36c0005824f07ab093616bdff247f3da817cae2c51371e1d1473af717d895 lld-5.0.1.src.tar.xz
5fa7489fc0225b11821cab0362f5813a05f2bcf2533e8a4ea9c9c860168807b0 llvm-5.0.1.src.tar.xz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to download the tarballs. How would you verify the SHA? (I don't think this is super important, though.)
windows/build_lld.bat
Outdated
devenv LLVM.sln /project lld /Build "MinSizeRel|Win32" || exit /B 1 | ||
|
||
if not exist ..\bin\nul md ..\bin | ||
copy MinSizeRel\bin\lld-link.exe ..\bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compress the exe and output with a version number, e.g. lld-link-5.0.1.zip
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building a zip file now. I'm not sure compressed exes are so great, I suspect it makes program execution slower than when reading the program from a fast disk or the file cache.
appveyor.yml
Outdated
- bin\lld-link.exe -> windows\build_lld.bat | ||
|
||
artifacts: | ||
- path: bin\lld-link.exe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether you could use variables here bin\lld-link-%VERSION%.zip
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the docs lld-link-$(VERSION).zip
should work.
windows/build_lld.bat
Outdated
set CMAKE_OPT=%CMAKE_OPT% -DLLVM_INCLUDE_DIRS="c:/projects/llvm/include" | ||
|
||
cmake %CMAKE_OPT% ..\llvm || exit /B 1 | ||
devenv LLVM.sln /project lld /Build "MinSizeRel|Win32" || exit /B 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we trigger this manually, or build the script when the version/file changed? Running half an hour for every unrelated change seems wasteful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppVeyor supports crons, so we could run it once a day?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build can be triggered manually if you login to Appveyor. LLD is cached (from master builds) and is only rebuilt if the dependency changes, i.e. currently the batch file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a fully manual build, you could add.
branches: { only: [manually-triggered-build] }
But indeed using the cache is also a good idea.
windows/build_lld.bat
Outdated
cmake %CMAKE_OPT% ..\llvm || exit /B 1 | ||
devenv LLVM.sln /project lld /Build "MinSizeRel|Win32" || exit /B 1 | ||
|
||
zip ../../lld-link-%LLVM_VER%.zip MinSizeRel\bin\lld-link.exe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cd MinSizeRel\bin
7z a ..\..\..\..\lld-link-%LLMV_VER%.zip lld-link.exe
appveyor.yml
Outdated
- 'lld-link-%LLVM_VER%.zip -> windows\build_lld.bat' | ||
|
||
artifacts: | ||
- path: bin\lld-link-$(LLVM_VER).zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without the bin\
now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I guess it's also using %LLVM_VER%
expansion.
- root seems to be project checkout
AppVeyor would still copy the artifacts for every commit on master. |
d6153bd
to
72503fb
Compare
72503fb
to
5b114fa
Compare
Artifacts could also be uploaded when rebuilt, see https://github.com/dlang/installer/pull/284/files#diff-180360612c6b8c4ed830919bbb4dd459R58 for an example. |
5b114fa
to
121868d
Compare
121868d
to
7e25cbc
Compare
Signed and uploaded |
Thanks. Should we add a similar build branch for the mingw libraries? The build tool dlang/tools#267 could be moved to the installer in that case. |
Yes, let's add all the irregularly build ones. |
|
No description provided.