[PATCH] [lnt] Update Clang Stage 1: configure, RA, using system compiler to use CMAKE

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 15:55:20 PST 2016


+BUILD_RECORD_TEMPLATE = '/clang.roots/BuildRecords/{}-9999.99_install’

I the install dir should be flat, maybe just /clang.build/



+                  'clang-703': 3.5,
+                  'clang-702': 3.5,
+                  "clang-700": 4.7,
+                  'clang-600': 4.7}

Those are Apple’s clangs, the branch names should match the open source releases.




These should be removed if they are comments:

+    #check_hanging_processes()
     check_repo_state(conf.workspace)
-    configure_cmd = [conf.srcdir() + "/configure"]
+    #check_cmake()
+    #check_host_clang()
+    #check_int_zorg_updated()





 assert False, "Invalid parameter for apple-clang.”

Should be “clang-builder”?




 '-DLLVM_ENABLE_PIC=On', # rdar://problem/24142671

Maybe mention the jist of this radar for the Non Apple people.




More comments:

+            #'-DCMAKE_C_FLAGS_RELWITHDEBINFO=-O2 -gline-tables-only -DNDEBUG',
+            #"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -gline-tables-only -DNDEBUG',

 
+            #if conf.assertions:
+            #    cmake_command.append('-DLLVM_ENABLE_ASSERTIONS=On')
+





This does not work, correct? Maybe remove it for now.

# Two stage build, via the make files.
+            run_cmd(clang_br, ['mkdir',
+                           './Objects',
+                           './Symbols',
+                           './Root',
+                           './Caches'])
+
+            developer_dir = '/Applications/Xcode.app/Contents/Developer'
+            supported_arches = 'armv6 armv7 armv7s arm64 i386 x86_64 x86_64h'
+            # Add various settings that would normally come from XBS.
+            enviroment = {'DEVELOPER_DIR': developer_dir,
+                          'DT_TOOLCHAIN_DIR': toolchain,
+                          'TOOLCHAIN_INSTALL_DIR': toolchain,
+                          'MACOSX_DEPLOYMENT_TARGET': '10.10',
+                          'TOOLCHAINS': 'default',
+                          'SDKROOT': sdkroot,
+                          'RC_SUPPORTED_ARCHS': supported_arches,
+                          'SRCROOT': '{}/clang'.format(conf.workspace),
+                          'OBJROOT': '{}/Objects'.format(clang_br),
+                          'SYMROOT': '{}/Symbols'.format(clang_br),
+                          'DSTROOT': '{}/Root'.format(clang_br),
+                          'CCHROOT': '{}/Caches'.format(clang_br),
+                          'RC_ProjectName': project,
+                          'RC_ProjectSourceVersion':'9999.99.9',
+                          'RC_ProjectNameAndSourceVersion': '{}-9999.99.9'.format(project),
+                          'RC_ProjectBuildVersion': 1,
+                          'RC_ReleaseStatus': 'Development',
+                          'LLVM_INCLUDE_TESTS': 'yes',
+                          'LLVM_REPOSITORY:': conf._svn_url,
+                          }
+            make_command = ['make', '-C', 'clang']
+
+            enviroment['RC_ARCHS'] = 'x86_64'
+            enviroment['RC_x86_64'] = 'YES'
+            enviroment['RC_XBS'] = 'YES'
+            enviroment['RC_BUILDIT'] = 'YES'
+
+            # Add build system overrides we use to:
+            #   1. Build all of the tools (so we can run tests later).
+            #   2. Generate Order files
+            #   3. Build with LTO
+            #   4. bootstrap
+            #   5. Supply version information to get baked into Clang.
+            make_command.append('Clang_Build_All=1')
+            make_command.append('Clang_Build_No_Tools=NO')
+
+            if not conf.lto:
+                make_command.append('Clang_Enable_LTO=0')
+
+            if not conf.orderfile:
+                make_command.append('Clang_Autogenerate_Order_File=0')
+            else:
+                make_command.append('Clang_Autogenerate_Order_File=1')
+
+            if conf.nobootstrap:
+                make_command.append('Clang_Enable_Bootstrap=0')
+
+            if conf.debug:
+                make_command.append('Clang_Use_Optimized=0')
+
+            if conf.assertions:
+                make_command.append('Clang_Use_Assertions=1')
+            else:
+                make_command.append('Clang_Use_Assertions=0')
+
+
+            repo_str = 'megaclang/{}'.format(conf.branch())
+            enviroment['CLANG_REPOSITORY_STRING'] = repo_str
+            enviroment['SVN_REVISION'] = conf.svn_rev
+            if conf.device:
+                make_command.append('install-cross')
+                dest_dir = '.'
+            else:
+                make_command.append('install')
+                dest_dir = toolchain
+
+            run_ws(make_command, enviroment)
+
+            build_upload_artifact()
+







Some of the clangs on green dragon are not this new:

CLANG_VERSION_OUTPUT = """Apple LLVM version 7.0.0 (clang-700.0.59.1)

Many are clang-602.0.53






Should be zorg not int_zorg:

   "stat -f \"%m\" /opt/llvm/int_zorg/.git/FETCH_HEAD": "1426029951"}
+
Although, I’m not sure you even exercise this test output anymore.



Does this do anything? It should be removed (unless you are planning something??? :) )

+    parser.add_argument('--sanitize', dest='sanitize',
+                        action='store_true')



> On Feb 3, 2016, at 11:50 AM, Marc Schifer <mschifer at apple.com> wrote:
> 
> Chris,
> 
> This is the patch to update the stage 1 bot to use CMAKE instead of the now deprecated  auto tools it previously used.
> this patch addresses only the stage 1 part of the build at the moment. The fix for stage 2 will follow shortly.
> This patch includes changes to build.py for the actual bot changes and test_build.py to update the LIT tests to match.
> This should be a drop in replacement for the current version with no changes required to the Jenkins job.
> 
> <clang_stage1_confiure_ra.patch>
> Marc S.
> 
> 



More information about the llvm-commits mailing list