[all-commits] [llvm/llvm-project] ee34ca: [llvm-cvtres] Reduce the set of dependencies of ll...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed Apr 21 01:51:03 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ee34ca34c6675531c0d86709ebf99beef2ee7db1
      https://github.com/llvm/llvm-project/commit/ee34ca34c6675531c0d86709ebf99beef2ee7db1
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-04-21 (Wed, 21 Apr 2021)

  Changed paths:
    M llvm/tools/llvm-cvtres/CMakeLists.txt
    M llvm/tools/llvm-cvtres/llvm-cvtres.cpp

  Log Message:
  -----------
  [llvm-cvtres] Reduce the set of dependencies of llvm-cvtres. NFC.

Don't use createBinary() but call the WindowsResource class directly.
The createBinary() function references all supported object file
types and ends up pulling way more from all the underlying libraries
than what is necessary.

This shrinks a stripped llvm-cvtres from 4.6 MB to 463 KB.

Differential Revision: https://reviews.llvm.org/D100833


  Commit: 64bc44f5ddfb6da4b6a8b51ea9a03f8772b3ae95
      https://github.com/llvm/llvm-project/commit/64bc44f5ddfb6da4b6a8b51ea9a03f8772b3ae95
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-04-21 (Wed, 21 Apr 2021)

  Changed paths:
    M clang/test/CMakeLists.txt
    A clang/test/Preprocessor/Inputs/llvm-rc.h
    A clang/test/Preprocessor/llvm-rc.rc
    M clang/test/lit.cfg.py
    M llvm/test/tools/llvm-rc/absolute.test
    M llvm/test/tools/llvm-rc/codepage.test
    M llvm/test/tools/llvm-rc/cpp-output.test
    M llvm/test/tools/llvm-rc/flags.test
    M llvm/test/tools/llvm-rc/helpmsg.test
    M llvm/test/tools/llvm-rc/include-paths.test
    M llvm/test/tools/llvm-rc/language.test
    M llvm/test/tools/llvm-rc/memoryflags-stringtable.test
    M llvm/test/tools/llvm-rc/memoryflags.test
    M llvm/test/tools/llvm-rc/not-expr.test
    M llvm/test/tools/llvm-rc/parser-expr.test
    M llvm/test/tools/llvm-rc/parser.test
    A llvm/test/tools/llvm-rc/preproc.test
    M llvm/test/tools/llvm-rc/tag-accelerators.test
    M llvm/test/tools/llvm-rc/tag-dialog.test
    M llvm/test/tools/llvm-rc/tag-escape.test
    M llvm/test/tools/llvm-rc/tag-html.test
    M llvm/test/tools/llvm-rc/tag-icon-cursor.test
    M llvm/test/tools/llvm-rc/tag-menu.test
    M llvm/test/tools/llvm-rc/tag-stringtable.test
    M llvm/test/tools/llvm-rc/tag-user.test
    M llvm/test/tools/llvm-rc/tag-versioninfo.test
    M llvm/test/tools/llvm-rc/tokenizer.test
    M llvm/test/tools/llvm-rc/versioninfo-padding.test
    M llvm/tools/llvm-rc/Opts.td
    M llvm/tools/llvm-rc/llvm-rc.cpp

  Log Message:
  -----------
  [llvm-rc] Run clang to preprocess input files

Allow opting out from preprocessing with a command line argument.

Update tests to pass -no-preprocess to make it not try to use clang
(which isn't a build level dependency of llvm-rc), but add a test that
does preprocessing under clang/test/Preprocessor.

Update a few options to allow them both joined (as -DFOO) and separate
(-D BR), as rc.exe allows both forms of them.

With the verbose flag set, this prints the preprocessing command
used (which differs from what rc.exe does).

Tests under llvm/test/tools/llvm-rc only test constructing the
preprocessor commands, while tests under clang/test/Preprocessor test
actually running the preprocessor.

Differential Revision: https://reviews.llvm.org/D100755


Compare: https://github.com/llvm/llvm-project/compare/11072a0bdbc0...64bc44f5ddfb


More information about the All-commits mailing list