[PATCH] D75323: Support relative dest paths in headermap files

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 20 12:02:47 PDT 2020


vsapsai added a comment.

There is nothing in header maps preventing from using relative paths. For example, I was able to run one of the tests with relative paths like

  ./bin/clang -cc1 -fsyntax-only ../../../llvm-project/clang/test/Preprocessor/headermap-rel.c -I ./tools/clang/test/Preprocessor/Output/headermap-rel.c.tmp.hmap -F ../../../llvm-project/clang/test/Preprocessor/Inputs/headermap-rel

and its mapping is

  {
    "mappings" :
      {
       "Foo.h" : "Foo/Foo.h"
      }
  }

In the test suite most of hmap mappings use relative paths. Quick search has revealed only nonportable-hmaps/foo.hmap.json <https://github.com/llvm/llvm-project/blob/master/clang/test/Preprocessor/Inputs/nonportable-hmaps/foo.hmap.json> to use absolute paths. So relative paths are working and tests make sure they keep working.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75323/new/

https://reviews.llvm.org/D75323





More information about the cfe-commits mailing list