[ Home ]
SBCL Internals

The pages on this CLiki-driven site can be edited by anybody at any time. No warranty of any kind can therefore be made; any implied warranties of merchantability or fitness for a particular purpose are expressly disclaimed
[ Home ] [ Recent Changes ] [ About CLiki ] [ Text Formatting ]

Cross Compiler Macros

Explanation courtesy of Christophe Rhodes on IRC?, reformatted somewhat

DEFMACRO defines a host macro when seen by the host and a target macro when seen by the cross-compiler

SB!XC:DEFMACRO, on the other hand, defines a cross-compiler macro when seen by the host and a target macro when seen by the cross-compiler - i.e. defmacro and sb!xc:defmacro are the same to the cross-compiler

DEF!MACRO does some or all of these things as it judges appropriate, but DEF!MACRO is made up of DEFMACRO and SB!XC:DEFMACRO operations; these two are the fundamental ones to understand

Example:

DEF!STRUCT FOO => DEFSTRUCT FOO + SB-XC:DEFSTRUCT FOO

DEF!STRUCT SB-XC:FOO => DEFSTRUCT SB-XC:FOO + SB-XC:DEFSTRUCT FOO


This page is linked from: Basics   Build  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively