mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Make llvmc work again.
Chris recently broke llvmc with his Makefile changes (r75379). That patch made the global change .o -> .a, which caused built-in llvmc plugins to stop working since plugin initialization in llvmc is based on static variables not referenced from the main executable. This patch implements auto-generated forced references to the plugin libraries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74000 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
29
include/llvm/CompilerDriver/ForceLinkageMacros.h
Normal file
29
include/llvm/CompilerDriver/ForceLinkageMacros.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//===--- ForceLinkageMacros.h - The LLVM Compiler Driver --------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open
|
||||
// Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Preprocessor magic that forces references to static libraries - common
|
||||
// macros used by both driver and plugins.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_INCLUDE_COMPILER_DRIVER_FORCE_LINKAGE_MACROS_H
|
||||
#define LLVM_INCLUDE_COMPILER_DRIVER_FORCE_LINKAGE_MACROS_H
|
||||
|
||||
#define LLVMC_FORCE_LINKAGE_PREFIX(PluginName) ForceLinkage ## PluginName
|
||||
|
||||
#define LLVMC_FORCE_LINKAGE_FUN(PluginName) \
|
||||
LLVMC_FORCE_LINKAGE_PREFIX(PluginName)
|
||||
|
||||
#define LLVMC_FORCE_LINKAGE_DECL(PluginName) \
|
||||
void LLVMC_FORCE_LINKAGE_FUN(PluginName) ()
|
||||
|
||||
#define LLVMC_FORCE_LINKAGE_CALL(PluginName) \
|
||||
LLVMC_FORCE_LINKAGE_FUN(PluginName) ()
|
||||
|
||||
#endif // LLVM_INCLUDE_COMPILER_DRIVER_FORCE_LINKAGE_MACROS_H
|
Reference in New Issue
Block a user