Improve support for compiler-rt tests in CMake build.

Now compiler-rt tests run correctly if compiler-rt is checked out into
arbitrary directory (not necessarily projects/compiler-rt).
Patch by Greg Fitzgerald!


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182726 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/lsan/lit_tests/lit.cfg b/lib/lsan/lit_tests/lit.cfg
index c7438c0..2be359e 100644
--- a/lib/lsan/lit_tests/lit.cfg
+++ b/lib/lsan/lit_tests/lit.cfg
@@ -11,9 +11,8 @@
   return attr_value
 
 # Setup attributes common for all compiler-rt projects.
-llvm_src_root = get_required_attr(config, 'llvm_src_root')
-compiler_rt_lit_unit_cfg = os.path.join(llvm_src_root, "projects",
-                                        "compiler-rt", "lib",
+compiler_rt_src_root = get_required_attr(config, 'compiler_rt_src_root')
+compiler_rt_lit_unit_cfg = os.path.join(compiler_rt_src_root, "lib",
                                         "lit.common.unit.cfg")
 lit.load_config(config, compiler_rt_lit_unit_cfg)
 
@@ -24,8 +23,8 @@
 config.test_source_root = os.path.dirname(__file__)
 
 # Setup attributes common for all compiler-rt projects.
-compiler_rt_lit_cfg = os.path.join(llvm_src_root, "projects", "compiler-rt",
-                                   "lib", "lit.common.cfg")
+compiler_rt_lit_cfg = os.path.join(compiler_rt_src_root, "lib",
+                                   "lit.common.cfg")
 if (not compiler_rt_lit_cfg) or (not os.path.exists(compiler_rt_lit_cfg)):
   lit.fatal("Can't find common compiler-rt lit config at: %r"
             % compiler_rt_lit_cfg)