simon-git: msvc-extract (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Wed Jun 2 14:05:47 BST 2021
TL;DR:
874e3a8 Factor out check_trie_path.
94948ae Rename 'headersymlink' to something more generic.
6ecf98d Call makesymlinks for libs too.
e9ae8c5 New option --aliases, to read a list of file aliases.
Repository: https://git.tartarus.org/simon/msvc-extract.git
On the web: https://git.tartarus.org/?p=simon/msvc-extract.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2021-06-02 14:05:47
commit 874e3a86818fa40697c2441fd77a9ef01f94c9f4
web diff https://git.tartarus.org/?p=simon/msvc-extract.git;a=commitdiff;h=874e3a86818fa40697c2441fd77a9ef01f94c9f4;hp=afe71dd006146b71cb1d36eb5435ca33cfe5e42f
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jun 2 13:44:36 2021 +0100
Factor out check_trie_path.
This function is extracted from the middle of headerscan(), and
contains the part that receives an arbitrary Windows-like pathname
(with case and slashes any old way), normalises it into a lowercase
pathname with Unix slashes, and inserts symlinks as necessary into
trie_outer to ensure that the former pathname will resolve to the
latter.
No functional change: this just rearranges existing code, with the
intention that check_trie_path will now be callable from other
contexts as well.
msvc-extract.c | 211 ++++++++++++++++++++++++++++++---------------------------
1 file changed, 110 insertions(+), 101 deletions(-)
commit 94948ae402f15b8cb3d3ce493692a1365523cace
web diff https://git.tartarus.org/?p=simon/msvc-extract.git;a=commitdiff;h=94948ae402f15b8cb3d3ce493692a1365523cace;hp=874e3a86818fa40697c2441fd77a9ef01f94c9f4
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jun 2 13:45:14 2021 +0100
Rename 'headersymlink' to something more generic.
I'm going to want to use it for libraries as well as headers, so I've
renamed it 'outputsymlink', and the same goes for its context
structure. And 'headermodify', the function that calls it, is now
called 'makesymlinks' for the same reason.
msvc-extract.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
commit 6ecf98d3d5f143addc3d05f8c00431d0a2ed61eb
web diff https://git.tartarus.org/?p=simon/msvc-extract.git;a=commitdiff;h=6ecf98d3d5f143addc3d05f8c00431d0a2ed61eb;hp=94948ae402f15b8cb3d3ce493692a1365523cace
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jun 2 13:45:53 2021 +0100
Call makesymlinks for libs too.
Now, if the trie indicates that any library file needs to be accessed
via a non-normalised pathname, the same symlink-making machinery will
run at tar output time to ensure that's possible.
As yet, no entries of that sort will show up in the trie. But the next
commit will make that possible.
msvc-extract.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
commit e9ae8c5e78d25686bdb2aeedca2a50b552ebc273
web diff https://git.tartarus.org/?p=simon/msvc-extract.git;a=commitdiff;h=e9ae8c5e78d25686bdb2aeedca2a50b552ebc273;hp=6ecf98d3d5f143addc3d05f8c00431d0a2ed61eb
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jun 2 13:49:20 2021 +0100
New option --aliases, to read a list of file aliases.
The header and library directories output by this tool assume that
you'll be #including headers, and linking against libraries, by
lowercase names containing Unix-style directory separators (if any
separators are even needed). Symlinks are written into the tar file to
cope with violations of this principle within the MSVC header files
themselves. But additional violations outside the MSVC headers have
hitherto been regarded as the user's problem to edit out of their
application code.
But what if the user is trying to compile third-party library code
into their application, which they can't (conveniently) edit, but
which also isn't detected by msvc-extract and compensated for? It may
be necessary for additional mixed-case and/or mixed-slash pathnames to
be made to work, to support a particular code base.
The new --aliases option enables this. You provide it with a text file
listing pathnames of header files and/or libraries that you need to
work, and it will insert symlinks as appropriate. For example, you
might write lines that say
Ws2tcpip.h
AdvAPI.lib
and you'd get a tar file that makes each of those a symlink to its
lowercase version, just as if one of MSVC's own headers had referred
to the file by the mixed-case name.
README.txt | 64 +++++++++++++++++++++++++++++++++++++++++-----------------
msvc-extract.c | 38 ++++++++++++++++++++++++++++++++--
2 files changed, 81 insertions(+), 21 deletions(-)
More information about the tartarus-commits
mailing list