File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1455,9 +1455,18 @@ function(configure_lit_site_cfg site_in site_out)
1455
1455
1456
1456
set (LIT_SITE_CFG_IN_HEADER "# Autogenerated from ${site_in} \n # Do not edit!" )
1457
1457
1458
+ # Lit converts config paths to lower case in discovery.py, before
1459
+ # loading the config. This causes __file__ to be all lower-case (including
1460
+ # the drive letter), but several clang tests pass -include %s and a
1461
+ # clang warning checks that passed case matches on-disk cache. So it's
1462
+ # important that this restores the on-disk case of the prefix.
1458
1463
string (CONCAT LIT_SITE_CFG_IN_HEADER "${LIT_SITE_CFG_IN_HEADER} \n\n "
1459
1464
"# Allow generated lit.site.cfg.py to be relocatable.\n "
1460
- "def path(p): return os.path.normpath(os.path.join(os.path.dirname(__file__), p)).replace(os.sep, '/') if p else ''\n "
1465
+ "def path(p):\n "
1466
+ " if not p: return ''\n "
1467
+ " p = os.path.normpath(os.path.join(os.path.dirname(__file__), p)).replace(os.sep, '/')\n "
1468
+ " if os.name == 'nt' and os.path.isabs(p): return p[0].upper() + p[1:]\n "
1469
+ " return p\n "
1461
1470
)
1462
1471
1463
1472
# Override config_target_triple (and the env)
You can’t perform that action at this time.
0 commit comments