simon-git: msvc-extract (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Jan 17 14:54:40 GMT 2021
TL;DR:
548ff7a Typo in README.
374c1d0 Rewrite case-mashing symlink generation.
a556141 Rewrite setup script output.
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-01-17 14:54:40
commit 548ff7a93307ad9659dd87290e2920d6c1f506ab
web diff https://git.tartarus.org/?p=simon/msvc-extract.git;a=commitdiff;h=548ff7a93307ad9659dd87290e2920d6c1f506ab;hp=ea51e78678634d0be6b68e49c4cc962e132bce43
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Jan 17 13:06:07 2021 +0000
Typo in README.
README.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 374c1d00b75e6a9454b13e7bf102d99eab9c98e3
web diff https://git.tartarus.org/?p=simon/msvc-extract.git;a=commitdiff;h=374c1d00b75e6a9454b13e7bf102d99eab9c98e3;hp=548ff7a93307ad9659dd87290e2920d6c1f506ab
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Jan 17 13:54:48 2021 +0000
Rewrite case-mashing symlink generation.
The previous version had several bugs. Firstly, it did the wrong thing
with symlinks in subdirectories: if it saw '#include <Foo/Bar.h>' in a
header, then it would write a symlink at Foo/Bar.h whose actual link
text was "foo/bar.h", which doesn't work, because symlinks are
relative to the link file itself, so just "bar.h" would have been
appropriate.
Secondly, it could only cope with one layer of subdirectories, because
I looked for a '/' in the pathname using strcspn and then trimmed
everything _after_ it. If you're doing it that way round, you need to
use strrchr.
And thirdly, it couldn't cope with input paths containing backslashes,
and would simply complain on standard error if it saw one.
The rewrite solves all of these, I think. It now copes even if it sees
a mixed-slash include such as '#include <Foo/Bar\Baz/Quux.h>', and
will output links
Foo -> foo
foo/Bar\Baz -> bar/baz (leaf name of link is all of 'Bar\Baz')
foo/bar/baz/Quux.h -> quux.h
so that the pathname as a whole should actually work if read by a Unix
compiler.
msvc-extract.c | 117 ++++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 87 insertions(+), 30 deletions(-)
commit a556141ec4d2fccb8552d84d1848e29e7163d191
web diff https://git.tartarus.org/?p=simon/msvc-extract.git;a=commitdiff;h=a556141ec4d2fccb8552d84d1848e29e7163d191;hp=374c1d00b75e6a9454b13e7bf102d99eab9c98e3
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Jan 17 14:29:39 2021 +0000
Rewrite setup script output.
The new-look setup script is much more idiomatically Python 3 than the
version I hastily converted in commit 84d90e5eb9. Also, alongside it,
there's a new 'make-wrapper.py', which you can give the full pathname
of some other binary (such as clang-cl or lld-link), and it will write
out a wrapper shell script of the same name which sets up INCLUDE and
LIB appropriately. My plan is to use that to arrange a method of
building with this setup that doesn't require pre-set environment
variables at build time: instead, you point your build script at these
wrappers in place of the real binaries, and everything just works.
msvc-extract.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 86 insertions(+), 16 deletions(-)
More information about the tartarus-commits
mailing list