Skip to content

Commit

Permalink
build: Tidy up a bunch of tool Makefiles, and simplify where possible…
Browse files Browse the repository at this point in the history
… using the

new all-targets pseudo-component.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142401 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ddunbar committed Oct 18, 2011
1 parent bfe2a6b commit 8c39c96
Show file tree
Hide file tree
Showing 28 changed files with 106 additions and 144 deletions.
8 changes: 4 additions & 4 deletions tools/bugpoint-passes/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..
LIBRARYNAME = BugpointPasses
LOADABLE_MODULE = 1
USEDLIBS =
LEVEL := ../..
LIBRARYNAME := BugpointPasses
LOADABLE_MODULE := 1
USEDLIBS :=

# If we don't need RTTI or EH, there's no reason to export anything
# from this plugin.
Expand Down
9 changes: 4 additions & 5 deletions tools/bugpoint/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..

TOOLNAME = bugpoint

LINK_COMPONENTS := asmparser instrumentation scalaropts ipo \
linker bitreader bitwriter
LEVEL := ../..
TOOLNAME := bugpoint
LINK_COMPONENTS := asmparser instrumentation scalaropts ipo linker bitreader \
bitwriter

include $(LEVEL)/Makefile.common
6 changes: 3 additions & 3 deletions tools/edis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..
LIBRARYNAME = EnhancedDisassembly
LINK_LIBS_IN_SHARED = 1
LEVEL := ../..
LIBRARYNAME := EnhancedDisassembly
LINK_LIBS_IN_SHARED := 1

EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/EnhancedDisassembly.exports

Expand Down
18 changes: 8 additions & 10 deletions tools/gold/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..
LIBRARYNAME = LLVMgold
LEVEL := ../..
LIBRARYNAME := LLVMgold
LINK_COMPONENTS := support
LINK_LIBS_IN_SHARED := 1
SHARED_LIBRARY := 1
LOADABLE_MODULE := 1

EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/gold.exports

Expand All @@ -17,15 +21,9 @@ EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/gold.exports
# early so we can set up LINK_COMPONENTS before including Makefile.rules
include $(LEVEL)/Makefile.config

LINK_LIBS_IN_SHARED=1
SHARED_LIBRARY = 1
LOADABLE_MODULE = 1

LINK_COMPONENTS := support

# Because off_t is used in the public API, the largefile parts are required for
# ABI compatibility.
CXXFLAGS+=-I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
CXXFLAGS+=$(SharedLibDir)/$(SharedPrefix)LTO$(SHLIBEXT)
CXXFLAGS += -I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
CXXFLAGS += $(SharedLibDir)/$(SharedPrefix)LTO$(SHLIBEXT)

include $(LEVEL)/Makefile.common
14 changes: 4 additions & 10 deletions tools/llc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..
TOOLNAME = llc
LEVEL := ../..
TOOLNAME := llc
LINK_COMPONENTS := all-targets bitreader asmparser

# Include this here so we can get the configuration of the targets
# that have been configured for construction. We have to do this
# early so we can set up LINK_COMPONENTS before including Makefile.rules
include $(LEVEL)/Makefile.config

LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitreader asmparser

include $(LLVM_SRC_ROOT)/Makefile.rules
include $(LEVEL)/Makefile.common

3 changes: 1 addition & 2 deletions tools/lli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
#
##===----------------------------------------------------------------------===##

LEVEL := ../..
LEVEL := ../..
TOOLNAME := lli
LINK_COMPONENTS := mcjit jit interpreter nativecodegen bitreader asmparser selectiondag

# Enable JIT support
include $(LEVEL)/Makefile.common
8 changes: 4 additions & 4 deletions tools/llvm-ar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..

TOOLNAME = llvm-ar
LINK_COMPONENTS = archive
LEVEL := ../..
TOOLNAME := llvm-ar
LINK_COMPONENTS := archive
REQUIRES_EH := 1

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
6 changes: 3 additions & 3 deletions tools/llvm-as/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..
TOOLNAME = llvm-as
LEVEL := ../..
TOOLNAME := llvm-as
LINK_COMPONENTS := asmparser bitwriter

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
6 changes: 3 additions & 3 deletions tools/llvm-bcanalyzer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..

TOOLNAME = llvm-bcanalyzer
LEVEL := ../..
TOOLNAME := llvm-bcanalyzer
LINK_COMPONENTS := bitreader

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
7 changes: 3 additions & 4 deletions tools/llvm-cov/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..

TOOLNAME = llvm-cov
LEVEL := ../..
TOOLNAME := llvm-cov
LINK_COMPONENTS := instrumentation

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
6 changes: 3 additions & 3 deletions tools/llvm-diff/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..
TOOLNAME = llvm-diff
LEVEL := ../..
TOOLNAME := llvm-diff
LINK_COMPONENTS := asmparser bitreader

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
6 changes: 3 additions & 3 deletions tools/llvm-dis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..

TOOLNAME = llvm-dis
LEVEL := ../..
TOOLNAME := llvm-dis
LINK_COMPONENTS := bitreader analysis

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
8 changes: 4 additions & 4 deletions tools/llvm-dwarfdump/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..

TOOLNAME = llvm-dwarfdump
LINK_COMPONENTS = DebugInfo Object
LEVEL := ../..
TOOLNAME := llvm-dwarfdump
LINK_COMPONENTS := DebugInfo Object

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
7 changes: 3 additions & 4 deletions tools/llvm-extract/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..

TOOLNAME = llvm-extract
LEVEL := ../..
TOOLNAME := llvm-extract
LINK_COMPONENTS := ipo bitreader bitwriter asmparser

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
7 changes: 3 additions & 4 deletions tools/llvm-ld/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..

TOOLNAME = llvm-ld
LINK_COMPONENTS = ipo scalaropts linker archive bitwriter
LEVEL := ../..
TOOLNAME := llvm-ld
LINK_COMPONENTS := ipo scalaropts linker archive bitwriter

include $(LEVEL)/Makefile.common
8 changes: 4 additions & 4 deletions tools/llvm-link/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..

TOOLNAME = llvm-link
LINK_COMPONENTS = linker bitreader bitwriter asmparser
LEVEL := ../..
TOOLNAME := llvm-link
LINK_COMPONENTS := linker bitreader bitwriter asmparser

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
17 changes: 5 additions & 12 deletions tools/llvm-mc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,11 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..
TOOLNAME = llvm-mc
LEVEL := ../..
TOOLNAME := llvm-mc
LINK_COMPONENTS := all-targets MCDisassembler MCParser MC support

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1

# Include this here so we can get the configuration of the targets
# that have been configured for construction. We have to do this
# early so we can set up LINK_COMPONENTS before including Makefile.rules
include $(LEVEL)/Makefile.config

LINK_COMPONENTS := $(TARGETS_TO_BUILD) MCDisassembler MCParser MC support

include $(LLVM_SRC_ROOT)/Makefile.rules
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
8 changes: 4 additions & 4 deletions tools/llvm-nm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..

TOOLNAME = llvm-nm
LINK_COMPONENTS = archive bitreader object
LEVEL := ../..
TOOLNAME := llvm-nm
LINK_COMPONENTS := archive bitreader object

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
9 changes: 4 additions & 5 deletions tools/llvm-objdump/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..

TOOLNAME = llvm-objdump
LINK_COMPONENTS = $(TARGETS_TO_BUILD) DebugInfo MC MCParser MCDisassembler \
Object
LEVEL := ../..
TOOLNAME := llvm-objdump
LINK_COMPONENTS := all-targets DebugInfo MC MCParser MCDisassembler Object

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
6 changes: 3 additions & 3 deletions tools/llvm-prof/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..

TOOLNAME = llvm-prof
LINK_COMPONENTS = bitreader analysis
LEVEL := ../..
TOOLNAME := llvm-prof
LINK_COMPONENTS := bitreader analysis

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
Expand Down
8 changes: 4 additions & 4 deletions tools/llvm-ranlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..
TOOLNAME = llvm-ranlib
LINK_COMPONENTS = archive
LEVEL := ../..
TOOLNAME := llvm-ranlib
LINK_COMPONENTS := archive
REQUIRES_EH := 1

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

include $(LEVEL)/Makefile.common
16 changes: 5 additions & 11 deletions tools/llvm-rtdyld/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..
TOOLNAME = llvm-rtdyld
LEVEL := ../..
TOOLNAME := llvm-rtdyld
LINK_COMPONENTS := all-targets support MC object RuntimeDyld JIT

# This tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
TOOL_NO_EXPORTS := 1

# Include this here so we can get the configuration of the targets
# that have been configured for construction. We have to do this
# early so we can set up LINK_COMPONENTS before including Makefile.rules
include $(LEVEL)/Makefile.config

LINK_COMPONENTS := $(TARGETS_TO_BUILD) support MC object RuntimeDyld JIT

include $(LLVM_SRC_ROOT)/Makefile.rules
include $(LEVEL)/Makefile.common
8 changes: 4 additions & 4 deletions tools/llvm-shlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
#
##===----------------------------------------------------------------------===##

LEVEL = ../..
LEVEL := ../..

LIBRARYNAME = LLVM-$(LLVMVersion)

NO_BUILD_ARCHIVE = 1
LINK_LIBS_IN_SHARED = 1
SHARED_LIBRARY = 1
NO_BUILD_ARCHIVE := 1
LINK_LIBS_IN_SHARED := 1
SHARED_LIBRARY := 1

include $(LEVEL)/Makefile.config

Expand Down
Loading

0 comments on commit 8c39c96

Please sign in to comment.