Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Issue 7730004: add llvm configure flags to enable/disable target OSes/Envs

Created:
9 years, 4 months ago by jvoung - send to chromium...
Modified:
9 years, 4 months ago
Reviewers:
Base URL:
https://llvm.org/svn/llvm-project/llvm/trunk/
Visibility:
Public.

Description

Add configure flags --enable-target-oses=os1,os2 and --enable-target-envs=env1,env2 similar to --enable-target=arch1,arch2. These flags generate pre-processor defines that are then checked within the Triple module to force certain code paths to be considered dead (if llvm is built with an LTO-enabled-compiler). The if-defs could be spread further to give the same benefit for non-LTO compilers, but that isn't done right now... Concretely, if you build LLVM w/ clang -O4 and --enable-target-oses=Linux, there is about a 170 KB savings (most of the MC COFF support, plus some branches in various places). If --enable-target-envs=gnu is also specified then most of MC MachO code is also pruned: lto, all oses, all environments: 12757900 lto, only Linux, all environments: 12584978 lto, only Linux, only gnu environment: 12528216

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+556 lines, -31 lines) Patch
M Makefile.rules View 1 chunk +10 lines, -0 lines 0 comments Download
M Makefile.config.in View 1 chunk +6 lines, -0 lines 0 comments Download
M autoconf/configure.ac View 1 chunk +96 lines, -0 lines 0 comments Download
M configure View 8 chunks +121 lines, -4 lines 0 comments Download
M include/llvm/ADT/Triple.h View 2 chunks +206 lines, -0 lines 0 comments Download
M lib/MC/MCObjectFileInfo.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M lib/Support/Triple.cpp View 2 chunks +99 lines, -0 lines 0 comments Download
M lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M lib/Target/TargetLibraryInfo.cpp View 1 chunk +1 line, -1 line 0 comments Download
M lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp View 1 chunk +1 line, -1 line 0 comments Download
M lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp View 3 chunks +3 lines, -4 lines 0 comments Download
M lib/Target/X86/X86Subtarget.h View 2 chunks +8 lines, -14 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698