collect_and_build_with_pgo.py: adapt to monorepo
authorKristof Beyls <kristof.beyls@arm.com>
Mon, 30 Nov 2020 12:43:44 +0000 (13:43 +0100)
committerKristof Beyls <kristof.beyls@arm.com>
Tue, 1 Dec 2020 08:16:12 +0000 (09:16 +0100)
Differential Revision: https://reviews.llvm.org/D92328

llvm/utils/collect_and_build_with_pgo.py

index 5a8686a..e9f8261 100755 (executable)
@@ -146,9 +146,9 @@ class Env:
 
     def has_llvm_subproject(self, name):
         if name == 'compiler-rt':
-            subdir = 'projects/compiler-rt'
+            subdir = '../compiler-rt'
         elif name == 'clang':
-            subdir = 'tools/clang'
+            subdir = '../clang'
         else:
             raise ValueError('Unknown subproject: %s' % name)
 
@@ -161,9 +161,8 @@ class Env:
                     cwd=None,
                     check=False,
                     silent_unless_error=False):
-        cmd_str = ' '.join(shlex.quote(s) for s in cmd)
         print(
-            'Running `%s` in %s' % (cmd_str, shlex.quote(cwd or os.getcwd())))
+            'Running `%s` in %s' % (cmd, shlex.quote(cwd or os.getcwd())))
 
         if self.dry_run:
             return
@@ -372,7 +371,8 @@ def _parse_args():
     else:
         output_dir = os.path.abspath(args.out_dir)
 
-    extra_args = {'CMAKE_BUILD_TYPE': 'Release'}
+    extra_args = {'CMAKE_BUILD_TYPE': 'Release',
+                  'LLVM_ENABLE_PROJECTS': 'clang;compiler-rt;lld'}
     for arg in args.cmake_extra_arg:
         if arg.startswith('-D'):
             arg = arg[2:]