mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 20:03:14 +01:00
Merge branch 'master' into merge-1.073-a
This commit is contained in:
@@ -233,13 +233,10 @@ void AggregateDeclaration::addField(Scope *sc, VarDeclaration *v)
|
||||
if (!isUnionDeclaration())
|
||||
sc->offset = ofs;
|
||||
#endif
|
||||
#if !IN_LLVM
|
||||
if (global.params.is64bit && sc->structalign == 8 && memalignsize == 16)
|
||||
if (global.params.is64bit && sc->structalign == 8 && memalignsize == 16 && isUnionDeclaration())
|
||||
/* Not sure how to handle this */
|
||||
;
|
||||
else
|
||||
#endif
|
||||
if (sc->structalign < memalignsize)
|
||||
else if (sc->structalign < memalignsize)
|
||||
memalignsize = sc->structalign;
|
||||
if (alignsize < memalignsize)
|
||||
alignsize = memalignsize;
|
||||
|
||||
@@ -272,12 +272,14 @@ int linkObjToBinary(bool sharedLib)
|
||||
else
|
||||
output.append(libExt);
|
||||
}
|
||||
args.push_back("-shared");
|
||||
} else if (global.params.os == OSWindows && !endsWith(output, ".exe")) {
|
||||
output.append(".exe");
|
||||
}
|
||||
}
|
||||
|
||||
if (sharedLib)
|
||||
args.push_back("-shared");
|
||||
|
||||
args.push_back("-o");
|
||||
args.push_back(output.c_str());
|
||||
|
||||
@@ -348,7 +350,7 @@ int linkObjToBinary(bool sharedLib)
|
||||
|
||||
OutBuffer buf;
|
||||
if (opts::createSharedLib && addSoname) {
|
||||
std::string soname = opts::soname.getNumOccurrences() == 0 ? output : opts::soname;
|
||||
std::string soname = opts::soname;
|
||||
if (!soname.empty()) {
|
||||
buf.writestring("-Wl,-soname,");
|
||||
buf.writestring(soname.c_str());
|
||||
|
||||
@@ -2881,7 +2881,7 @@ DValue* StructLiteralExp::toElem(IRState* p)
|
||||
#if DMDV2
|
||||
else if (vd == sd->vthis) {
|
||||
IF_LOG Logger::println("initializing vthis");
|
||||
val = new DImValue(Type::tvoidptr, DtoBitCast(DtoNestedContext(loc, sd), getVoidPtrType()));
|
||||
val = new DImValue(vd->type, DtoBitCast(DtoNestedContext(loc, sd), DtoType(vd->type)));
|
||||
}
|
||||
#endif
|
||||
else
|
||||
|
||||
@@ -12,7 +12,7 @@ default:
|
||||
"-I@RUNTIME_DIR@/src",
|
||||
"-I@PHOBOS2_DIR@/",
|
||||
"-L-L@PROJECT_BINARY_DIR@/../lib", @MUTILIB_ADDITIONAL_PATH@
|
||||
"-defaultlib=phobos2-ldc",
|
||||
"-debuglib=phobos2-ldc"
|
||||
"-defaultlib=phobos-ldc",
|
||||
"-debuglib=phobos-ldc"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -13,12 +13,15 @@ endif()
|
||||
include(CheckTypeSize)
|
||||
check_type_size(void* ptr_size)
|
||||
if(${ptr_size} MATCHES "^8$") ## if it's 64-bit OS
|
||||
set(IS_64BIT_OS 1)
|
||||
endif(${ptr_size} MATCHES "^8$")
|
||||
set(MULTILIB_SUFFIX 32)
|
||||
else()
|
||||
set(MULTILIB_SUFFIX 64)
|
||||
endif()
|
||||
|
||||
set(DMDFE_MINOR_VERSION 0)
|
||||
set(DMDFE_PATCH_VERSION 58)
|
||||
set(DMDFE_VERSION ${D_VERSION}.${DMDFE_MINOR_VERSION}.${DMDFE_PATCH_VERSION})
|
||||
|
||||
set(DMDFE_MINOR_VERSION 0 CACHE INT "Minor version of dmd frontend")
|
||||
set(DMDFE_PATCH_VERSION 58 CACHE INT "Patch version of dmd frontend")
|
||||
set(DMDFE_VERSION ${D_VERSION}.${DMDFE_MINOR_VERSION}.${DMDFE_PATCH_VERSION} CACHE INT "Version of dmd frontend")
|
||||
set(MULTILIB OFF CACHE BOOL "Build both 64-bit and 32-bit libraries")
|
||||
set(BUILD_BC_LIBS OFF CACHE BOOL "Build the runtime as bytecode libraries")
|
||||
set(BUILD_SINGLE_LIB ON CACHE BOOL "Build single runtime library")
|
||||
@@ -136,8 +139,8 @@ endif(NOT LDC_LOC)
|
||||
#
|
||||
|
||||
if(MULTILIB)
|
||||
set(MUTILIB_ADDITIONAL_PATH "\n \"-L-L${CMAKE_BINARY_DIR}/lib32\",")
|
||||
set(MUTILIB_ADDITIONAL_INSTALL_PATH "\n \"-L-L${CMAKE_INSTALL_PREFIX}/lib32\",")
|
||||
set(MUTILIB_ADDITIONAL_PATH "\n \"-L-L${CMAKE_BINARY_DIR}/lib${MULTILIB_SUFFIX}\",")
|
||||
set(MUTILIB_ADDITIONAL_INSTALL_PATH "\n \"-L-L${CMAKE_INSTALL_PREFIX}/lib${MULTILIB_SUFFIX}\",")
|
||||
endif(MULTILIB)
|
||||
|
||||
configure_file(${PROJECT_PARENT_DIR}/${CONFIG_NAME}.conf.in ${PROJECT_BINARY_DIR}/../bin/${LDC_EXE}.conf)
|
||||
@@ -335,11 +338,7 @@ endif(PHOBOS2_DIR)
|
||||
build_runtime("" "" "" "" "${LIB_SUFFIX}")
|
||||
set(GENERATE_DI "")
|
||||
if(MULTILIB)
|
||||
if(IS_64BIT_OS)
|
||||
build_runtime("-m32" "-m32" "-m32" "" "32")
|
||||
else(IS_64BIT_OS)
|
||||
build_runtime("-m64" "-m64" "-m64" "" "64")
|
||||
endif(IS_64BIT_OS)
|
||||
build_runtime("-m${MULTILIB_SUFFIX}" "-m${MULTILIB_SUFFIX}" "-m${MULTILIB_SUFFIX}" "" "${MULTILIB_SUFFIX}")
|
||||
endif(MULTILIB)
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user