• Home
  • Raw
  • Download

Lines Matching +full:os +full:- +full:release

2 ##===- utils/llvmbuild - Build the LLVM project ----------------*-python-*-===##
9 ##===----------------------------------------------------------------------===##
46 # llvmbuild --src=~/llvm/commit --src=~/llvm/staging --src=~/llvm/official
47 # --build=debug --build=release --build=paranoid
48 # --prefix=/home/greened/install --builddir=/home/greened/build
52 # ~/install. llvm-compilers-check creates separate build and install
54 # llvmbuild will build debug, release and paranoid (debug+checks)
58 # The user may control parallelism via the --jobs and --threads
59 # switches. --jobs tells llvm-compilers-checl the maximum total
61 # as equivalent to the GNU make -j switch. --threads tells
62 # llvm-compilers-check how many worker threads to use to accomplish
63 # those builds. If --threads is less than --jobs, --threads workers
65 # to build. Then llvm-compilers-check will invoke GNU make with -j
66 # (--jobs / --threads) to use up the remaining job capacity. Once a
70 ##===----------------------------------------------------------------------===##
73 import os
85 string listing directories separated by 'os.pathsep'; defaults to
86 os.environ['PATH']). Returns the complete filename or None if not
90 path = os.environ['PATH']
91 paths = path.split(os.pathsep)
93 if os.name == 'os2':
94 (base, ext) = os.path.splitext(executable)
95 # executable files on OS/2 can have an arbitrary extension, but
100 pathext = os.environ['PATHEXT'].lower().split(os.pathsep)
101 (base, ext) = os.path.splitext(executable)
106 if os.path.isfile(execname):
110 f = os.path.join(p, execname)
111 if os.path.isfile(f):
117 return os.path.exists(fpath) and os.access(fpath, os.X_OK)
120 parser.add_option("-v", "--verbose", action="store_true",
124 parser.add_option("--src", action="append",
125 help=("Top-level source directory [default: %default]"))
126 parser.add_option("--build", action="append",
128 parser.add_option("--cc", default=find_executable("cc"),
130 parser.add_option("--cxx", default=find_executable("c++"),
132 parser.add_option("--threads", default=4, type="int",
135 parser.add_option("--jobs", "-j", default=8, type="int",
138 parser.add_option("--prefix",
140 parser.add_option("--builddir",
142 parser.add_option("--extra-llvm-config-flags", default="",
144 parser.add_option("--force-configure", default=False, action="store_true",
146 parser.add_option("--no-dragonegg", default=False, action="store_true",
148 parser.add_option("--no-install", default=False, action="store_true",
150 parser.add_option("--keep-going", default=False, action="store_true",
152 parser.add_option("--no-flavor-prefix", default=False, action="store_true",
154 parser.add_option("--enable-werror", default=False, action="store_true",
155 help=("Build with -Werror"))
170 if (not os.path.isdir(compsrc)):
193 bases = [os.path.basename(src) for src in unique_paths]
206 unique_paths = [os.path.dirname(src) for src in unique_paths]
282 prefix = self.component_abbrev[component.replace("-", "_")]
283 pwd = os.getcwd()
284 if not os.path.exists(execdir):
285 os.makedirs(execdir)
287 execenv = os.environ.copy()
305 + str(line, "utf-8").rstrip())
320 command += ["-v", "-x", "c++", "/dev/null", "-fsyntax-only"]
336 includes.append(str(line, "utf-8").strip())
352 prefix = "[" + ssabbrev[self.source_abbrev[source]] + "-" + self.build_abbrev[build] + "]"
364 cxxroot = os.path.dirname(cxxincludes[0]) # Remove the version
365 cxxroot = os.path.dirname(cxxroot) # Remove the c++
366 cxxroot = os.path.dirname(cxxroot) # Remove the include
369 llvm=dict(debug=["--prefix=" + self.install_prefix,
370 "--enable-assertions",
371 "--disable-optimized",
372 "--with-gcc-toolchain=" + cxxroot],
373 release=["--prefix=" + self.install_prefix,
374 "--enable-optimized",
375 "--with-gcc-toolchain=" + cxxroot],
376 paranoid=["--prefix=" + self.install_prefix,
377 "--enable-assertions",
378 "--enable-expensive-checks",
379 "--disable-optimized",
380 "--with-gcc-toolchain=" + cxxroot]),
382 release=[],
386 configure_flags["llvm"]["debug"].append("--enable-werror")
387 configure_flags["llvm"]["release"].append("--enable-werror")
388 configure_flags["llvm"]["paranoid"].append("--enable-werror")
393 release=dict(CC=self.cc,
399 release=dict(CC=self.cc,
405 llvm=dict(debug=["-j" + str(self.jobs)],
406 release=["-j" + str(self.jobs)],
407 paranoid=["-j" + str(self.jobs)]),
408 dragonegg=dict(debug=["-j" + str(self.jobs)],
409 release=["-j" + str(self.jobs)],
410 paranoid=["-j" + str(self.jobs)]))
414 release=dict(),
417 LLVM_CONFIG=self.install_prefix + "/bin/llvm-config"),
418 release=dict(GCC=self.cc,
419 LLVM_CONFIG=self.install_prefix + "/bin/llvm-config"),
421 LLVM_CONFIG=self.install_prefix + "/bin/llvm-config")))
425 release=["install"],
428 release=["install"],
433 release=dict(),
436 release=dict(),
441 release=["check"],
444 release=["check"],
449 release=dict(),
452 release=dict(),
468 comp_key = comp.replace("-", "_")
521 prefix = self.component_abbrev[component.replace("-", "_")]
523 self.logger.debug("Configure " + str(flags) + " " + str(srcdir) + " -> "
532 for conf, mf in configure_files[component.replace("-", "_")]:
537 if not os.path.exists(conf):
539 return -1
541 if os.path.exists(conf) and os.path.exists(mf):
542 confstat = os.stat(conf)
543 makestat = os.stat(mf)
557 return -1
560 args += ["--verbose"]
577 build_abbrev = dict(debug="dbg", release="opt", paranoid="par")
588 format='%(name)-13s: %(message)s')
591 format='%(name)-13s: %(message)s')