2011-11-17 08:12:10 +08:00
|
|
|
#===- lib/profile/Makefile.mk ------------------------------*- Makefile -*--===#
|
|
|
|
#
|
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
|
|
|
#
|
|
|
|
#===------------------------------------------------------------------------===#
|
|
|
|
|
2011-12-02 10:42:07 +08:00
|
|
|
ModuleName := profile
|
2011-11-17 08:12:10 +08:00
|
|
|
SubDirs :=
|
|
|
|
|
PGO: Add explicit static initialization
Instead of relying on explicit static initialization from translation
units, create a new file, InstrProfilingRuntime.cc, with an
__llvm_pgo_runtime variable. After this commit (and its pair in clang),
the driver will create a use of this variable. Unless the user defines
their own version, the new object file will get pulled in, including
that C++ static initialization that calls
__llvm_pgo_register_write_atexit.
The result is that, at least on Darwin, static initialization typically
consists of a single function call, which registers a writeout functino
atexit. Furthermore, users can skip even this behaviour by defining
their own __llvm_pgo_runtime.
<rdar://problem/15943240>
llvm-svn: 204380
2014-03-21 03:23:53 +08:00
|
|
|
Sources := $(foreach file,$(wildcard $(Dir)/*.c $(Dir)/*.cc),$(notdir $(file)))
|
|
|
|
ObjNames := $(patsubst %.c,%.o,$(patsubst %.cc,%.o,$(Sources)))
|
2011-11-17 08:12:10 +08:00
|
|
|
Implementation := Generic
|
|
|
|
|
|
|
|
# FIXME: use automatic dependencies?
|
|
|
|
Dependencies := $(wildcard $(Dir)/*.h)
|