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

Windows: package system runtime dependencies #9662

Closed
wants to merge 2 commits into from

Conversation

vadimcn
Copy link
Contributor

@vadimcn vadimcn commented Oct 1, 2013

This will make sure that system files that rust binaries depend on in Windows get packaged into stage0 snapshots as well as into Windows installer.
Currently these include libgcc_s_dw2-1.dll, libstdc++-6.dll and libpthread-2.dll. Note that the latter will need to be changed to pthreadGC2.dll once Windows build bots get upgraded to mingw 4.0

Closes #9252
Closes #5878
Closes #9218
Closes #5712

@@ -155,6 +165,12 @@ def hash_file(x):
h.update(open(x, "rb").read())
return scrub(h.hexdigest())

def find_on_path(file_name):
for dir in os.environ["PATH"].split(';'):
Copy link
Member

Choose a reason for hiding this comment

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

This seems like it would only dubiously work on anything other than windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean PATH vs LIBPATH and the path separator? Yes, but this only needs to work on WIndows. I don't see the point of getting it to work on all platforms currently.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking : vs ;. Can you add a comment saying that this is windows-specific?

Copy link
Member

Choose a reason for hiding this comment

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

Python has os.pathsep, which is simple enough.

@alexcrichton
Copy link
Member

Has this been tested to make sure that the behavior is as expected? Also, this should cause snapshots to continue to work regardless of what mingw version the snapshot was built on, right?

@brson
Copy link
Contributor

brson commented Oct 1, 2013

Let's think a minute about the licensing issues here.

@brson
Copy link
Contributor

brson commented Oct 1, 2013

OK, since we're going to be distributing binaries of GPL code we need to include the license and a link to the source code. So here's what I think we should do:

  • Add src/etc/third-party, containing COPYING.txt and README.txt
  • Put the correct version of the GPL in COPYING.txt
  • In README.txt put some prose about which files are GPL licensed and a link to the correct source for the version of MinGW we're running on the bots.
  • Copy this directory to both the snapshots and the installer.

@brson
Copy link
Contributor

brson commented Oct 2, 2013

The dlls on the win1 bot don't have a version in their metadata, but here are their dates:

  • libgcc_s_dw2-1.dll 1/7/2011
  • libstdc++6.dll 1/7/2011
  • libpthread-2.dll 2/18/2010

@brson
Copy link
Contributor

brson commented Oct 2, 2013

@vadimcn
Copy link
Contributor Author

vadimcn commented Oct 2, 2013

@brson: how about this?
Licenses and readme will go under bin/ third-party

@brson
Copy link
Contributor

brson commented Oct 4, 2013

@vadimcn thanks

bors added a commit that referenced this pull request Oct 4, 2013
This will make sure that system files that rust binaries depend on in Windows get packaged into stage0 snapshots as well as into Windows installer.
Currently these include `libgcc_s_dw2-1.dll`, `libstdc++-6.dll` and `libpthread-2.dll`.   Note that the latter will need to be changed to `pthreadGC2.dll` once Windows build bots get upgraded to mingw 4.0

Closes #9252
Closes #5878
Closes #9218
Closes #5712
@bors bors closed this Oct 4, 2013
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Oct 4, 2013
Now that rust-lang#9662 is merged, we should be much more easily bootstrappable on
windows now.
bors added a commit that referenced this pull request Oct 5, 2013
Now that #9662 is merged, we should be much more easily bootstrappable on
windows now.
@vadimcn vadimcn deleted the package-runtime-deps branch March 1, 2015 08:00
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 21, 2022
`result_large_err` show largest variants in err msg

fixes rust-lang#9538

changelog: Sugg: [`result_large_err`]: Now show largest enum variants in error message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants