This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a.c | |
#include <stdio.h> | |
void is_not_called(void) __attribute__((constructor)) { | |
printf("This isn't called!\n"); | |
} | |
// b.c | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# LLVM requires C++11. | |
set(CMAKE_CXX_STANDARD 11) | |
# Find LLVM (this looks for LLVMConfig.cmake somewhere in the PATH or LLVM_DIR). | |
find_package(LLVM REQUIRED CONFIG) | |
# Enable us to use the LLVM CMake modules. | |
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LLVM_CMAKE_DIR}") | |
# Enable us to use add_llvm_library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is free and unencumbered software released into the public domain. | |
// | |
// Anyone is free to copy, modify, publish, use, compile, sell, or | |
// distribute this software, either in source code form or as a compiled | |
// binary, for any purpose, commercial or non-commercial, and by any | |
// means. | |
// | |
// In jurisdictions that recognize copyright laws, the author or authors | |
// of this software dedicate any and all copyright interest in the | |
// software to the public domain. We make this dedication for the benefit |