)
endif(COMPILER_RT_BUILD_XRAY)
+if (COMPILER_RT_BUILD_PROFILE)
+ set(PROFILE_HEADERS
+ profile/InstrProfData.inc
+ )
+endif(COMPILER_RT_BUILD_PROFILE)
+
set(COMPILER_RT_HEADERS
${SANITIZER_HEADERS}
${FUZZER_HEADERS}
- ${XRAY_HEADERS})
+ ${XRAY_HEADERS}
+ ${PROFILE_HEADERS})
set(output_dir ${COMPILER_RT_OUTPUT_DIR}/include)
COMPONENT compiler-rt-headers
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray)
+# Install profile headers.
+install(FILES ${PROFILE_HEADERS}
+ COMPONENT compiler-rt-headers
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/profile)
if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs.
add_custom_target(install-compiler-rt-headers
)
set(PROFILE_HEADERS
- InstrProfData.inc
InstrProfiling.h
InstrProfilingInternal.h
InstrProfilingPort.h
)
endif()
+include_directories(..)
+include_directories(../../include)
+
if(FUCHSIA OR UNIX)
set(EXTRA_FLAGS
-fPIC
#include "InstrProfilingInternal.h"
#define INSTR_PROF_VALUE_PROF_DATA
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
COMPILER_RT_WEAK uint64_t INSTR_PROF_RAW_VERSION_VAR = INSTR_PROF_RAW_VERSION;
#include <stdio.h>
#define INSTR_PROF_VISIBILITY COMPILER_RT_VISIBILITY
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
enum ValueKind {
#define VALUE_PROF_KIND(Enumerator, Value, Descr) Enumerator = Value,
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
};
typedef void *IntPtrT;
typedef struct COMPILER_RT_ALIGNAS(INSTR_PROF_DATA_ALIGNMENT)
__llvm_profile_data {
#define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer) Type Name;
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
} __llvm_profile_data;
typedef struct __llvm_profile_header {
#define INSTR_PROF_RAW_HEADER(Type, Name, Initializer) Type Name;
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
} __llvm_profile_header;
typedef struct ValueProfNode * PtrToNodeT;
typedef struct ValueProfNode {
#define INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Initializer) Type Name;
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
} ValueProfNode;
/*!
*/
void INSTR_PROF_VALUE_PROF_FUNC(
#define VALUE_PROF_FUNC_PARAM(ArgType, ArgName, ArgLLVMType) ArgType ArgName
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
);
void __llvm_profile_instrument_target_value(uint64_t TargetValue, void *Data,
#include "InstrProfilingUtil.h"
#define INSTR_PROF_VALUE_PROF_DATA
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
COMPILER_RT_VISIBILITY
void (*VPMergeHook)(ValueProfData *, __llvm_profile_data *);
#include "InstrProfilingUtil.h"
#define INSTR_PROF_VALUE_PROF_DATA
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
/* Merge value profile data pointed to by SrcValueProfData into
* in-memory profile counters pointed by to DstData. */
#define INSTR_PROF_VALUE_PROF_DATA
#define INSTR_PROF_COMMON_API_IMPL
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
static int hasStaticCounters = 1;
static int OutOfNodesWarnings = 0;
#include "InstrProfilingPort.h"
#define INSTR_PROF_VALUE_PROF_DATA
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
COMPILER_RT_VISIBILITY void (*FreeHook)(void *) = NULL;
static ProfBufferIO TheBufferIO;
/* Initialize header structure. */
#define INSTR_PROF_RAW_HEADER(Type, Name, Init) Header.Name = Init;
-#include "InstrProfData.inc"
+#include "profile/InstrProfData.inc"
/* Write the data. */
ProfDataIOVec IOVec[] = {
copy("include") {
sources = [
"fuzzer/FuzzedDataProvider.h",
+ "profile/InstrProfData.inc",
"sanitizer/allocator_interface.h",
"sanitizer/asan_interface.h",
"sanitizer/common_interface_defs.h",
cflags += [ "/wd4221" ]
}
+ include_dirs = [
+ "..",
+ "../../include",
+ ]
+
sources = [
"GCDAProfiling.c",
"InstrProfiling.c",