[llvm-branch-commits] [llvm] 424fdbc - collect_and_build_with_pgo.py: adapt to monorepo

Kristof Beyls via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 1 00:22:07 PST 2020


Author: Kristof Beyls
Date: 2020-12-01T09:16:12+01:00
New Revision: 424fdbc3dedadf882fda107aa5638b39e7036c4d

URL: https://github.com/llvm/llvm-project/commit/424fdbc3dedadf882fda107aa5638b39e7036c4d
DIFF: https://github.com/llvm/llvm-project/commit/424fdbc3dedadf882fda107aa5638b39e7036c4d.diff

LOG: collect_and_build_with_pgo.py: adapt to monorepo

Differential Revision: https://reviews.llvm.org/D92328

Added: 
    

Modified: 
    llvm/utils/collect_and_build_with_pgo.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/collect_and_build_with_pgo.py b/llvm/utils/collect_and_build_with_pgo.py
index 5a8686a88b4f..e9f82617f4e9 100755
--- a/llvm/utils/collect_and_build_with_pgo.py
+++ b/llvm/utils/collect_and_build_with_pgo.py
@@ -146,9 +146,9 @@ def output_subdir(self, name):
 
     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 @@ def run_command(self,
                     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:]


        


More information about the llvm-branch-commits mailing list