[PATCH] D107041: [Flang] Ported test_symbols to Python

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 17 16:29:42 PDT 2021


Meinersbur added a comment.

You can have an LLVM build and a flang standalone build with just a single git checkout. That is:

  $ git clone https://github.com/llvm/llvm-project.git
  $ cmake -S llvm-project/llvm -B build-llvm -GNinja ...
  $ (cd build-llvm && ninja)
  $ cmake -S llvm-project/flang -B build-flang -GNinja -DLLVM_DIR=../build-llvm ...

My point is, it is irrelevant how you build LLVM & flang, you will have that same layout of the source checkout in all cases. This layout has a top-level `.gitignore` that already excludes `*.pyc` and automatically used by git while doing any operation in any subdirectory of the source checkout. git doesn't even know/care where/how the build directories are located.

I tested what happens if you have a symlink into a subdirectory of the llvm-project checkout. Turns out that git recognizes it is a symlink and still finds the `.gitignore` of the parent directory the symlink points to. That is, the only means I can think of where git does not recognize the `.gitignore` is when copying the flang subdirectory somewhere else (and copy back when upstreaming a change) or using git sparse checkouts <https://www.git-scm.com/docs/git-sparse-checkout>. The former is not how git was intended to be used and the latter only has experimental support.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107041



More information about the llvm-commits mailing list