def _install(self, builder, version): """ exec install """ self._logger.info('start install') ######################################## # change directory # build_dir = os.path.join(self._llvmenv_home, 'llvm_build', version, 'build') os.chdir(build_dir) ######################################## # do make install # cmd = [builder, 'install'] if common.exec_command_with_call(cmd): raise Exception('failed to configure') return
def _configure(self, generator, builder, version): """ exec configure """ self._logger.info('start configure') build_dir = self._llvmenv_home + '/llvm_build/' + version + '/build' ######################################## # change directory # os.chdir(build_dir) ######################################## # check generator # if generator != 'autotools' and generator != 'cmake': self._logger.warn('unknown generator : %s.' % generator) self._logger.info('use cmake') generator = 'cmake' ######################################## # create cmd # if generator == 'autotools': cmd = [ os.path.join(self._llvmenv_home, 'llvm_build', version, 'llvm', 'configure' )] elif generator == 'cmake': cmd = [generator] if builder == 'ninja': cmd.append('-G') cmd.append('Ninja') cmd.append('../llvm') args = self._generate_opts(generator, version) self._logger.info('configure option is ... %s' % args) cmd += args if common.exec_command_with_call(cmd): raise Exception('failed to configure') return
def _make(self, builder, version): """ exec make """ self._logger.info('start build') ######################################## # TODO: validate builder # ######################################## # change directory # build_dir = os.path.join(self._llvmenv_home, 'llvm_build', version, 'build') os.chdir(build_dir) ######################################## # do make # cmd = [builder, '-j', str(self._options.jobs)] if common.exec_command_with_call(cmd): raise Exception('failed to configure') return