[PATCH] D38015: [lit] Use inodes instead of realpaths in the config map
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 17:48:48 PDT 2017
zturner updated this revision to Diff 115768.
zturner added a comment.
Added missing file.
https://reviews.llvm.org/D38015
Files:
llvm/utils/lit/lit/discovery.py
llvm/utils/llvm-lit/llvm-lit.in
Index: llvm/utils/llvm-lit/llvm-lit.in
===================================================================
--- llvm/utils/llvm-lit/llvm-lit.in
+++ llvm/utils/llvm-lit/llvm-lit.in
@@ -7,11 +7,9 @@
def map_config(source_dir, site_config):
global config_map
- source_dir = os.path.realpath(source_dir)
- source_dir = os.path.normpath(source_dir)
- source_dir = os.path.normcase(source_dir)
+ source_inode = os.stat(source_dir).st_ino
site_config = os.path.normpath(site_config)
- config_map[source_dir] = site_config
+ config_map[source_inode] = site_config
# Variables configured at build time.
llvm_source_root = "@LLVM_SOURCE_DIR@"
Index: llvm/utils/lit/lit/discovery.py
===================================================================
--- llvm/utils/lit/lit/discovery.py
+++ llvm/utils/lit/lit/discovery.py
@@ -48,10 +48,8 @@
# configuration to load instead.
config_map = litConfig.params.get('config_map')
if config_map:
- cfgpath = os.path.realpath(cfgpath)
- cfgpath = os.path.normpath(cfgpath)
- cfgpath = os.path.normcase(cfgpath)
- target = config_map.get(cfgpath)
+ source_inode = os.stat(cfgpath)
+ target = config_map.get(source_inode)
if target:
cfgpath = target
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38015.115768.patch
Type: text/x-patch
Size: 1337 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170919/7c6e0c72/attachment.bin>
More information about the llvm-commits
mailing list