./ldc-1.41.0-src/0000755000175000017500000000000015077210640013471 5ustar matthiasmatthias./ldc-1.41.0-src/CMakeCPack.cmake0000644000175000017500000000061615077210640016360 0ustar matthiasmatthias# # Common CPack configuration # set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME}) set(CPACK_PACKAGE_VERSION ${LDC_VERSION}) set(CPACK_PACKAGE_CONTACT "public@dicebot.lv") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LDC: LLVM D Compiler") # # Debian specifics # execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE) set(CPACK_DEBIAN_PACKAGE_SECTION "devel") ./ldc-1.41.0-src/.clang-tidy0000644000175000017500000000071315077210635015532 0ustar matthiasmatthiasChecks: -*,modernize-*,-modernize-redundant-void-arg,google-readability-braces-around-statements,google-explicit-constructor,google-readability-casting,misc-assert-side-effect,misc-assign-operator-signature,misc-inefficient-algorithm,misc-move-constructor-init,misc-non-copyable-objects,misc-sizeof-container,misc-undelegated-constructor,misc-unused-alias-decls,readability-container-size-empty,readability-else-after-return,readability-redundant-string-cstr ./ldc-1.41.0-src/bitrise.yml0000644000175000017500000001663015077210635015667 0ustar matthiasmatthiasformat_version: '8' default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios app: envs: - BITRISE_PROJECT_PATH: ldc-build-runtime.tmp/TestRunner/TestRunner.xcodeproj - BITRISE_SCHEME: TestRunner - BITRISE_EXPORT_METHOD: development - LLVM_VERSION: 15.0.7 - HOST_LDC_VERSION: 1.24.0 - IOS_VERSION: 12.0 workflows: primary: steps: - cache-pull@2.1.4: {} - certificate-and-profile-installer@1.10.3: {} - script@1.1.6: title: Download LLVM inputs: - content: |- #!/bin/bash set -ex curl -fL --retry 3 --max-time 300 "https://github.com/ldc-developers/llvm-project/releases/download/ldc-v${LLVM_VERSION}/llvm-${LLVM_VERSION}-osx-x86_64.tar.xz" -o llvm.tar.xz tar xf llvm.tar.xz envman add --key LLVM_ROOT_DIR --value "$(pwd)/llvm-${LLVM_VERSION}-osx-x86_64" - script@1.1.6: title: Download LDC inputs: - content: |- #!/bin/bash set -ex curl -fL --retry 3 --max-time 300 "https://github.com/ldc-developers/ldc/releases/download/v${HOST_LDC_VERSION}/ldc2-${HOST_LDC_VERSION}-osx-x86_64.tar.xz" -o ldc.tar.xz tar xf ldc.tar.xz envman add --key PATH --value "$(pwd)/ldc2-${HOST_LDC_VERSION}-osx-x86_64/bin:$PATH" - script@1.1.6: title: Build LDC deps: brew: - name: cmake - name: ninja inputs: - content: |- #!/bin/bash set -ex mkdir build cd build cmake -G Ninja .. \ -DD_COMPILER=ldmd2 \ -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ROOT_DIR="$LLVM_ROOT_DIR" \ -DLDC_LINK_MANUALLY=OFF \ -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ ninja -j4 envman add --key LDC_BINARY --value "$(pwd)/bin/ldc2" - script@1.1.6: title: Cross-compile (iOS/arm64) druntime & Phobos, incl. debug unittest runners deps: brew: - name: cmake - name: ninja inputs: - content: |- #!/bin/bash set -ex build/bin/ldc-build-runtime \ --cFlags="-target;arm64-apple-ios${IOS_VERSION}" \ --dFlags="-mtriple=arm64-apple-ios${IOS_VERSION};-fvisibility=hidden" \ --ldcSrcDir=. \ --ninja \ -j 2 \ CMAKE_SYSTEM_NAME=iOS \ CMAKE_OSX_ARCHITECTURES=arm64 \ CMAKE_OSX_DEPLOYMENT_TARGET="${IOS_VERSION}" \ BUILD_SHARED_LIBS=OFF cd ldc-build-runtime.tmp ninja -j4 druntime-test-runner-debug phobos2-test-runner-debug - xcode-build-for-test@0.4.0: title: Build Xcode Project run_if: not .IsPR - virtual-device-testing-for-ios@0.9.10: title: Run druntime & Phobos debug unittests on iPhone run_if: not .IsPR inputs: - test_devices: iphone6s,12.0,en,portrait - download_test_results: true - script@1.1.6: title: Assemble Test Result run_if: not .IsPR is_always_run: true inputs: - runner_bin: "$LDC_BINARY -run" - script_file_path: "$BITRISE_STEP_SOURCE_DIR/main.d" - content: |- import std; /** * For some reason the xcresult produced by the previous step * has a flat file structure. The code in this step fixes that * so the next step can work. This code turns a file structure * looking like this: * * ``` * ├── TestLogs_Test-Transient Testing-2020.03.21_01-45-58--0700.xcresult_Data_data.0~-O0rfKEKRY3nIhjlqYnpkA66cLiUonVgCNYwugi05n9Jx5OzM2-LySzkK1msGnDLSE8q0NRhrhw7IzkvLpyeNw== * ├── TestLogs_Test-Transient Testing-2020.03.21_01-45-58--0700.xcresult_Data_data.0~1CjDi6o46z-JhUr8R_x8s2FSUso2vKw5JRCkXMC0u_NrVR82R9FCih_SAFsZ6QBlodOkzBPOcj109apBnmq3Xw== * ``` * * Into a file and directory structure like this: * * ``` * TestLogs_Test-Transient Testing-2020.03.21_01-45-58--0700.xcresult * ├── Data * │ ├── data.0~-O0rfKEKRY3nIhjlqYnpkA66cLiUonVgCNYwugi05n9Jx5OzM2-LySzkK1msGnDLSE8q0NRhrhw7IzkvLpyeNw== * │ ├── data.0~1CjDi6o46z-JhUr8R_x8s2FSUso2vKw5JRCkXMC0u_NrVR82R9FCih_SAFsZ6QBlodOkzBPOcj109apBnmq3Xw== * ``` */ void main() { static void copy(string source, string target) { const splitResult = target.split(".xcresult"); const xcresultDir = splitResult[0] ~ ".xcresult"; const embeddedDir = splitResult[1].dirName[1 .. $]; const targetDir = buildPath(xcresultDir, embeddedDir); mkdirRecurse(targetDir); std.file.copy(source, target); } const source = environment["VDTESTING_DOWNLOADED_FILES_DIR"]; auto paths = dirEntries(source, "*.xcresult*", SpanMode.shallow) .map!(e => e.name.absolutePath) .array; const sourceBase = (paths.front.split(".xcresult")[0] ~ ".xcresult").baseName; const targetBasePath = "xcresult".absolutePath; const xcresultPath = targetBasePath.buildPath(sourceBase); spawnProcess(["envman", "add", "--key", "BITRISE_XCRESULT_PATH", "--value", xcresultPath]).wait; paths .map!(e => e.split(".xcresult")[1]) .map!(e => e.split(".")) .map!(e => tuple(e[0].split("_"), e[1])) .map!(e => tuple(e[0].filter!(a => !a.empty).array, e[1])) .map!(e => tuple(e[0][0 .. $ - 1], e[0][$ - 1 .. $].front ~ '.' ~ e[1])) .map!(e => e[0].buildPath.buildPath(e[1])) .map!(e => targetBasePath.buildPath(sourceBase, e)) .zip(paths) .each!(e => copy(e[1], e[0])); } - xcparse@0.1.0: title: Extract Logs run_if: not .IsPR is_always_run: true inputs: - export_to_deploy: 'yes' - extract_attachments: 'no' - extract_code_coverage: 'no' - extract_logs: 'yes' - extract_screenshots: 'no' - script@1.1.6: title: Print Logs run_if: not .IsPR is_always_run: true inputs: - content: |- #!/bin/bash set -e unzip -qq "$XCPARSE_LOGS_PATH" find logs -name StandardOutputAndStandardError.txt | head -1 | xargs cat - deploy-to-bitrise-io@1.9.6: {} - cache-push@2.2.3: {} ./ldc-1.41.0-src/CMakeLists.txt0000644000175000017500000013306715077210635016247 0ustar matthiasmatthiascmake_minimum_required(VERSION 3.16.0) if(POLICY CMP0025) cmake_policy(SET CMP0025 NEW) endif() if(POLICY CMP0132) # see https://github.com/ldc-developers/ldc/issues/3901 cmake_policy(SET CMP0132 NEW) endif() if(${CMAKE_VERSION} VERSION_GREATER "3.26.9") # Prevent implicit dependencies for custom commands, e.g., # `obj/ldc2.o` depending on `lib/libldc.a` with LDC_LINK_MANUALLY=ON. # Only supported since CMake v3.27 unfortunately. set(CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY ON) endif() project(ldc) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules") include(FindDCompiler) include(CheckCXXCompilerFlag) include(CheckDSourceCompiles) include(CheckLinkFlag) include(BuildDExecutable) # Helper function function(append value) foreach(variable ${ARGN}) if(${variable} STREQUAL "") set(${variable} "${value}" PARENT_SCOPE) else() set(${variable} "${${variable}} ${value}" PARENT_SCOPE) endif() endforeach(variable) endfunction() # # Locate LLVM. # find_package(LLVM 15.0 REQUIRED all-targets analysis asmparser asmprinter bitreader bitwriter codegen core debuginfodwarf debuginfomsf debuginfopdb demangle instcombine ipo instrumentation irreader libdriver linker lto mc mcdisassembler mcparser objcarcopts object option profiledata scalaropts selectiondag support tablegen target transformutils vectorize windowsdriver windowsmanifest symbolize ${EXTRA_LLVM_MODULES}) math(EXPR LDC_LLVM_VER ${LLVM_VERSION_MAJOR}*100+${LLVM_VERSION_MINOR}) message(STATUS "Using LLVM Version ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}") # Remove LLVMTableGen library from list of libraries string(REGEX MATCH "[^;]*LLVMTableGen[^;]*" LLVM_TABLEGEN_LIBRARY "${LLVM_LIBRARIES}") string(REGEX REPLACE "[^;]*LLVMTableGen[^;]*;?" "" LLVM_LIBRARIES "${LLVM_LIBRARIES}") # Information about which targets LLVM was built to target foreach(LLVM_SUPPORTED_TARGET ${LLVM_TARGETS_TO_BUILD}) add_definitions("-DLDC_LLVM_SUPPORTED_TARGET_${LLVM_SUPPORTED_TARGET}=1") endforeach() # Set MLIR support variables if it is found. # FIXME: LLVM 14+ (`mlir::OwningModuleRef` replacement) if(NOT LDC_WITH_MLIR STREQUAL "OFF" AND LDC_LLVM_VER LESS 1400) include(FindMLIR) if(MLIR_FOUND) message(STATUS "-- Building LDC with MLIR support (${MLIR_ROOT_DIR})") include_directories(${MLIR_INCLUDE_DIR}) add_definitions("-DLDC_MLIR_ENABLED") set(LLVM_LIBRARIES "${MLIR_LIBRARIES}" ${LLVM_LIBRARIES}) else() message(STATUS "-- Building LDC without MLIR support: not found") endif() endif() # Check and adapt for LLVMSPIRVLib (Khronos SPIRV-LLVM-Translator) set(LLVM_SPIRV_FOUND OFF) if (LDC_LLVM_VER LESS 1600) if(MSVC) if(EXISTS "${LLVM_LIBRARY_DIRS}/LLVMSPIRVLib.lib") set(LLVM_SPIRV_FOUND ON) set(LLVM_LIBRARIES "${LLVM_LIBRARY_DIRS}/LLVMSPIRVLib.lib" ${LLVM_LIBRARIES}) endif() else() if((EXISTS "${LLVM_LIBRARY_DIRS}/libLLVMSPIRVLib.a") OR (EXISTS "${LLVM_LIBRARY_DIRS}/libLLVMSPIRVLib.so") OR (EXISTS "${LLVM_LIBRARY_DIRS}/libLLVMSPIRVLib.dylib")) set(LLVM_SPIRV_FOUND ON) set(LLVM_LIBRARIES -lLLVMSPIRVLib ${LLVM_LIBRARIES}) endif() endif() if(NOT LLVM_SPIRV_FOUND) find_package(PkgConfig) if(PkgConfig_FOUND) if(MSVC) # make pkg-config use -LC:\path\to\build\LLVMSPIRVLib.lib not -L-lLLVMSPIRVLib set(PKG_CONFIG_EXECUTABLE "${PKG_CONFIG_EXECUTABLE} --msvc-syntax") endif() pkg_check_modules(LLVM_SPIRV LLVMSPIRVLib) if(LLVM_SPIRV_FOUND) set(LLVM_SPIRV_FOUND ON) # translate 1 to ON include_directories(${LLVM_SPIRV_INCLUDE_DIRS}) else() set(LLVM_SPIRV_FOUND OFF) endif() endif() endif() if(LLVM_SPIRV_FOUND) message(STATUS "-- Building LDC with SPIR-V support") add_definitions("-DLDC_LLVM_SUPPORTED_TARGET_SPIRV=1") else() message(STATUS "-- Building LDC without SPIR-V support: not found") endif() endif() # # Get info about used Linux distribution. # include(GetLinuxDistribution) # # Main configuration. # # Version information set(LDC_VERSION "1.41.0") # May be overridden by git hash tag set(DMDFE_MAJOR_VERSION 2) set(DMDFE_MINOR_VERSION 111) set(DMDFE_PATCH_VERSION 0) set(DMD_VERSION ${DMDFE_MAJOR_VERSION}.${DMDFE_MINOR_VERSION}.${DMDFE_PATCH_VERSION}) # Generally, we want to install everything into CMAKE_INSTALL_PREFIX, but when # it is /usr, put the config files into /etc to meet common practice. if(NOT DEFINED SYSCONF_INSTALL_DIR) if(CMAKE_INSTALL_PREFIX STREQUAL "/usr") set(SYSCONF_INSTALL_DIR "/etc") else() set(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc") endif() endif() set(D_VERSION ${DMDFE_MAJOR_VERSION} CACHE STRING "D language version") set(PROGRAM_PREFIX "" CACHE STRING "Prepended to ldc/ldmd binary names") set(PROGRAM_SUFFIX "" CACHE STRING "Appended to ldc/ldmd binary names") set(CONF_INST_DIR ${SYSCONF_INSTALL_DIR} CACHE PATH "Directory ldc2.conf is installed to") set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/d CACHE PATH "Path to install D modules to") # Note: LIB_SUFFIX should perhaps be renamed to LDC_LIBDIR_SUFFIX. set(LIB_SUFFIX "" CACHE STRING "Appended to the library installation directory. Set to '64' to install libraries into ${PREFIX}/lib64.") set(COMPILE_D_MODULES_SEPARATELY OFF CACHE BOOL "Compile each D module separately (instead of all at once). Useful for many CPU cores and/or iterative development; generated executables will be somewhat slower.") set(LDC_ENABLE_ASSERTIONS "${LLVM_ENABLE_ASSERTIONS}" CACHE BOOL "Enable LDC assertions. Defaults to the LLVM assertions mode; overriding may cause LDC segfaults!") # Allow user to specify mimalloc.o location, to be linked with `ldc2` only set(ALTERNATIVE_MALLOC_O "" CACHE STRING "If specified, adds ALTERNATIVE_MALLOC_O object file to LDC link, to override the CRT malloc.") # Most linux distributions have a policy of not bundling dependencies like zlib set(PHOBOS_SYSTEM_ZLIB OFF CACHE BOOL "Use system zlib instead of Phobos' vendored version") if(D_VERSION EQUAL 1) message(FATAL_ERROR "D version 1 is no longer supported. Please consider using D version 2 or checkout the 'd1' git branch for the last version supporting D version 1.") elseif(D_VERSION EQUAL 2) set(LDC_EXE ldc2) set(LDMD_EXE ldmd2) set(RUNTIME druntime) append("-DDMDV2" CMAKE_CXX_FLAGS) else() message(FATAL_ERROR "unsupported D version") endif() set(LDC_EXE_NAME ${PROGRAM_PREFIX}${LDC_EXE}${PROGRAM_SUFFIX}) set(LDMD_EXE_NAME ${PROGRAM_PREFIX}${LDMD_EXE}${PROGRAM_SUFFIX}) # Setup D compiler flags (DMD syntax, which also works with LDMD). set(DFLAGS_BASE "-wi") set(DFLAGS_BUILD_TYPE "") # DFLAGS derived from CMAKE_BUILD_TYPE if(NOT MSVC_IDE) # for multi-config builds, these options have to be added later to the custom command if(CMAKE_BUILD_TYPE MATCHES "Debug") append("-g" DFLAGS_BUILD_TYPE) if(${D_COMPILER_ID} STREQUAL "LDMD") append("-link-debuglib" DFLAGS_BASE) endif() elseif(CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo") append("-g -O -inline -release" DFLAGS_BUILD_TYPE) else() # Default to a Release build type append("-O -inline -release" DFLAGS_BUILD_TYPE) endif() if(LDC_ENABLE_ASSERTIONS) string(REPLACE " -release" "" DFLAGS_BUILD_TYPE "${DFLAGS_BUILD_TYPE}") endif() endif() if(MSVC) if(CMAKE_SIZEOF_VOID_P EQUAL 8) message(STATUS "Let D host compiler output 64-bit object files") append("-m64" DFLAGS_BASE) else() message(STATUS "Let D host compiler output 32-bit COFF object files") if(${D_COMPILER_ID} STREQUAL "DigitalMars") append("-m32mscoff" DFLAGS_BASE) else() append("-m32" DFLAGS_BASE) endif() endif() if(${D_COMPILER_ID} STREQUAL "DigitalMars" AND (MSVC_VERSION GREATER 1800)) # VS 2015+ append("-Llegacy_stdio_definitions.lib" DFLAGS_BASE) endif() set(llvm_ob_flag) string(REGEX MATCH "/Ob[0-2]" llvm_ob_flag "${LLVM_CXXFLAGS}") foreach(flag_var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) # CMake defaults to /W3, LLVM uses /W4 => MS compiler warns about overridden option. # Simply replace with /W4. string(REGEX REPLACE "/W[0-3]" "/W4" ${flag_var} "${${flag_var}}") # Some CMake configs default to /Ob1, LLVM uses /Ob2. Replace with LLVM's option. if(NOT llvm_ob_flag STREQUAL "") string(REGEX REPLACE "/Ob[0-2]" "${llvm_ob_flag}" ${flag_var} "${${flag_var}}") endif() endforeach() endif() # Use separate compiler flags for the frontend and for the LDC-specific parts, # as enabling warnings on the DMD frontend only leads to a lot of clutter in # the output (LLVM_CXXFLAGS sometimes already includes -Wall). set(LDC_CXXFLAGS) if(CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")) if(NOT MSVC) # not for Windows-clang append("-Wall -Wextra" LDC_CXXFLAGS) endif() # Disable some noisy warnings: # * -Wunused-parameter and -Wcomment trigger for LLVM headers # * -Wmissing-field-initializer leads to reams of warnings in gen/asm-*.h # * -Wnon-virtual-dtor is something Walter has declined to let us fix upstream # and it triggers for the visitors we need in our glue code # * -Wpedantic warns on trailing commas in initializer lists and casting # function pointers to void*. # * -Wgnu-anonymous-struct and -Wnested-anon-types trigger for tokens.h. # * -Wgnu-redeclared-enum triggers for various frontend headers. # * -Wunused-private-field triggers for expression.h. append("-Wno-unused-parameter -Wno-comment -Wno-missing-field-initializers -Wno-non-virtual-dtor" LDC_CXXFLAGS) if ((${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")) append("-Wno-gnu-anonymous-struct -Wno-nested-anon-types -Wno-gnu-redeclared-enum -Wno-unused-private-field" LDC_CXXFLAGS) # clang trying to eagerly anticipate linker errors wrt. static class template # members leads to false positives (e.g., instantiated/defined in D): # 'instantiation of variable required here, but no definition is available' append("-Wno-undefined-var-template" LDC_CXXFLAGS) endif() if(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "4.7.0") append("-Wno-pedantic" LDC_CXXFLAGS) endif() endif() if(MSVC) # Remove flags here, for exceptions and RTTI. # CL.EXE complains to override flags like "/GR /GR-". string(REGEX REPLACE "(^| )[/-]EH[-cs]*( |$)" "\\2" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REGEX REPLACE "(^| )[/-]GR-?( |$)" "\\2" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") append("/GR- /EHs-c-" CMAKE_CXX_FLAGS) append("/D_HAS_EXCEPTIONS=0" CMAKE_CXX_FLAGS) # disable warning C4201: nonstandard extension used: nameless struct/union append("/wd4201" LDC_CXXFLAGS) endif() # Append -mminimal-toc for gcc 4.0.x - 4.5.x on ppc64 if( CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6.0" ) append("-mminimal-toc" LDC_CXXFLAGS) endif() if(UNIX) append("-DLDC_POSIX" LDC_CXXFLAGS) endif() set(SANITIZE_CXXFLAGS) set(SANITIZE_LDFLAGS) if(SANITIZE) if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") append("-fsanitize=address" SANITIZE_CXXFLAGS) append("-fsanitize=address" SANITIZE_LDFLAGS) else() message(WARNING "Option SANITIZE specified but compiler is not clang.") endif() endif() append("${SANITIZE_CXXFLAGS}" LDC_CXXFLAGS) if(PHOBOS_SYSTEM_ZLIB) append("-DPHOBOS_SYSTEM_ZLIB" LDC_CXXFLAGS) endif() # LLVM_CXXFLAGS may contain -Werror which causes compile errors with dmd source string(REPLACE "-Werror " "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS}) if (UNIX AND NOT "${LLVM_LDFLAGS}" STREQUAL "") # LLVM_LDFLAGS may contain -l-lld which is a wrong library reference (AIX) string(REPLACE "-l-lld " "-lld " LLVM_LDFLAGS ${LLVM_LDFLAGS}) endif() if(MSVC) separate_arguments(LLVM_LDFLAGS WINDOWS_COMMAND "${LLVM_LDFLAGS}") if(NOT MSVC_IDE) # apparently not needed for VS (and spaces in path are problematic) if(CMAKE_SIZEOF_VOID_P EQUAL 8) list(APPEND LLVM_LDFLAGS "$ENV{VSINSTALLDIR}DIA SDK\\lib\\amd64\\diaguids.lib") else() list(APPEND LLVM_LDFLAGS "$ENV{VSINSTALLDIR}DIA SDK\\lib\\diaguids.lib") endif() endif() else() separate_arguments(LLVM_LDFLAGS UNIX_COMMAND "${LLVM_LDFLAGS}") endif() option(LDC_FULLY_STATIC "Posix: Link most executables (compiler and tools) as fully-static binaries" OFF) set(FULLY_STATIC_LDFLAG) if(UNIX AND LDC_FULLY_STATIC) set(FULLY_STATIC_LDFLAG "-static") endif() # Suppress superfluous randlib warnings about "*.a" having no symbols on MacOSX. if (${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang") # not supported by llvm-ranlib used with Homebrew clang set(CMAKE_C_ARCHIVE_CREATE " Scr ") set(CMAKE_CXX_ARCHIVE_CREATE " Scr ") set(CMAKE_C_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") set(CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") endif() # # Gather source files. # include(GetGitRevisionDescription) git_get_exact_tag(TAG) if(NOT TAG MATCHES "NOTFOUND") if(TAG MATCHES "v[0-9].*") # For a version tag, remove the leading 'v'. CMake 2.8.0 (e.g. Ubuntu # 10.04 LTS) doesn't support -1 in string(SUBSTRING ...), so spell it # out. string(LENGTH "${TAG}" taglen) MATH(EXPR taglen "${taglen} - 1") string(SUBSTRING "${TAG}" 1 ${taglen} LDC_VERSION) else() set(LDC_VERSION "${TAG}") endif() else() get_git_head_revision(REFSPEC HASH FALSE) if(NOT HASH STREQUAL "GITDIR-NOTFOUND") # Append git hash to LDC_VERSION string(SUBSTRING "${HASH}" 0 7 LDC_VERSION_HASH) set(LDC_VERSION "${LDC_VERSION}-git-${LDC_VERSION_HASH}") # Append "-dirty" when the working copy is dirty git_describe(GIT_DIRTY --dirty) if (GIT_DIRTY MATCHES ".*-dirty") set(LDC_VERSION "${LDC_VERSION}-dirty") endif() endif() endif() message(STATUS "LDC version identifier: ${LDC_VERSION}") configure_file(driver/ldc-version.cpp.in driver/ldc-version.cpp) configure_file(driver/ldc_version.d.in driver/ldc_version.d) # Also add the header files to the build so that they are available in IDE # project files generated via CMake. file(GLOB_RECURSE FE_SRC_D dmd/*.d) file(GLOB_RECURSE FE_HDR dmd/*.h) file(GLOB_RECURSE FE_RES dmd/res/*.*) file(GLOB_RECURSE GEN_SRC gen/*.cpp gen/abi/*.cpp) file(GLOB_RECURSE GEN_HDR gen/*.h gen/abi/*.h) file(GLOB_RECURSE GEN_SRC_D gen/*.d) file(GLOB_RECURSE IR_SRC ir/*.cpp) file(GLOB_RECURSE IR_HDR ir/*.h) file(GLOB_RECURSE IR_SRC_D ir/*.d) file(GLOB_RECURSE DRV_SRC_D driver/*.d) set(DRV_SRC driver/args.cpp driver/cache.cpp driver/cl_helpers.cpp driver/cl_options.cpp driver/cl_options_instrumentation.cpp driver/cl_options_sanitizers.cpp driver/cl_options-llvm.cpp driver/codegenerator.cpp driver/configfile.cpp driver/cpreprocessor.cpp driver/dcomputecodegenerator.cpp driver/exe_path.cpp driver/targetmachine.cpp driver/toobj.cpp driver/tool.cpp driver/archiver.cpp driver/linker.cpp driver/linker-gcc.cpp driver/linker-msvc.cpp driver/main.cpp driver/plugins.cpp ) set(DRV_SRC_EXTRA ${CMAKE_BINARY_DIR}/driver/ldc-version.cpp) set(DRV_HDR driver/args.h driver/cache.h driver/cache_pruning.h driver/cl_helpers.h driver/cl_options.h driver/cl_options_instrumentation.h driver/cl_options_sanitizers.h driver/cl_options-llvm.h driver/codegenerator.h driver/configfile.h driver/dcomputecodegenerator.h driver/exe_path.h driver/ldc-version.h driver/archiver.h driver/linker.h driver/plugins.h driver/targetmachine.h driver/toobj.h driver/tool.h ) # exclude man.d from ldc (only required by ldmd) list(REMOVE_ITEM FE_SRC_D ${PROJECT_SOURCE_DIR}/dmd/root/man.d ) set(LDC_CXX_SOURCE_FILES ${FE_HDR} ${GEN_SRC} ${GEN_HDR} ${IR_SRC} ${IR_HDR} ${DRV_SRC} ${DRV_SRC_EXTRA} ${DRV_HDR} ) set(LDC_D_SOURCE_FILES ${FE_SRC_D} ${GEN_SRC_D} ${IR_SRC_D} ${DRV_SRC_D} ) # source_group(TREE ...) requires CMake v3.8+ IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 3.7) source_group(TREE "${PROJECT_SOURCE_DIR}" PREFIX "Source Files" FILES ${FE_SRC_D} ${GEN_SRC} ${GEN_SRC_D} ${IR_SRC} ${IR_SRC_D} ${DRV_SRC} ${DRV_SRC_D}) source_group("Source Files\\driver" FILES ${DRV_SRC_EXTRA}) source_group(TREE "${PROJECT_SOURCE_DIR}" PREFIX "Header Files" FILES ${FE_HDR} ${GEN_HDR} ${IR_HDR} ${DRV_HDR}) endif() # # Configure the build system to use LTO and/or PGO while building LDC # include(HandleLTOPGOBuildOptions) # # Enable Dynamic compilation if supported for this platform and LLVM version. # set(LDC_DYNAMIC_COMPILE "AUTO" CACHE STRING "Support dynamic compilation (ON|OFF). Enabled by default; not supported for LLVM < 18.") option(LDC_DYNAMIC_COMPILE_USE_CUSTOM_PASSES "Use custom LDC passes in jit" ON) if(LDC_DYNAMIC_COMPILE STREQUAL "AUTO") if(LDC_LLVM_VER LESS 1800) set(LDC_DYNAMIC_COMPILE OFF) # FIXME: dynamic-compile regressions with LLVM 20 elseif(LDC_LLVM_VER LESS 2000) set(LDC_DYNAMIC_COMPILE ON) else() set(LDC_DYNAMIC_COMPILE OFF) endif() endif() # https://llvm.org/docs/JITLink.html for the list of supported platforms if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|x64|amd64|aarch64|arm64|riscv64|loongarch64") set(_LDC_DYNAMIC_COMPILE_USE_LLVM_JITLINK_DEFAULT ON) else() set(_LDC_DYNAMIC_COMPILE_USE_LLVM_JITLINK_DEFAULT OFF) endif() # Disable LLVM JITLink on Windows for now, currently does not work very well on Windows if(WIN32) set(_LDC_DYNAMIC_COMPILE_USE_LLVM_JITLINK_DEFAULT OFF) endif() option(LDC_DYNAMIC_COMPILE_USE_LLVM_JITLINK "Use the experimental but faster LLVM JITLink dynamic code linker" "${_LDC_DYNAMIC_COMPILE_USE_LLVM_JITLINK_DEFAULT}") message(STATUS "-- Building LDC with dynamic compilation support (LDC_DYNAMIC_COMPILE): ${LDC_DYNAMIC_COMPILE}") if(LDC_DYNAMIC_COMPILE) add_definitions(-DLDC_DYNAMIC_COMPILE) add_definitions(-DLDC_DYNAMIC_COMPILE_API_VERSION=4) endif() if (LDC_DYNAMIC_COMPILE_USE_LLVM_JITLINK) add_compile_definitions(LDC_JITRT_USE_JITLINK) endif() # # Includes, defines. # include_directories(. dmd) append("-I${PROJECT_SOURCE_DIR}" DFLAGS_LDC) append("-I${PROJECT_BINARY_DIR}" DFLAGS_LDC) append("-J${PROJECT_SOURCE_DIR}/dmd/res" DFLAGS_LDC) append("-version=IN_LLVM" DFLAGS_LDC) append("-DIN_LLVM" LDC_CXXFLAGS) append("-DOPAQUE_VTBLS" LDC_CXXFLAGS) # Predefine LDC_INSTALL_PREFIX as raw string literal, requiring shell + CMake escaping. # E.g., for CMAKE_INSTALL_PREFIX=`C:\dir with space`: # g++ "-DLDC_INSTALL_PREFIX=R\"(C:\dir with space)\"" ... # => LDC_INSTALL_PREFIX defined as `R"(C:\dir with space)"` append("\"-DLDC_INSTALL_PREFIX=R\\\"(${CMAKE_INSTALL_PREFIX})\\\"\"" LDC_CXXFLAGS) append("-DLDC_LLVM_VER=${LDC_LLVM_VER}" LDC_CXXFLAGS) append("\"-DLDC_LIBDIR_SUFFIX=R\\\"(${LIB_SUFFIX})\\\"\"" LDC_CXXFLAGS) append("-DLDC_HOST_${D_COMPILER_ID}=1" LDC_CXXFLAGS) append("-DLDC_HOST_FE_VER=${D_COMPILER_FE_VERSION}" LDC_CXXFLAGS) # If the LLVM is shared, add its lib dir to the hardcoded list used for library lookups. if(LLVM_IS_SHARED) append("\"-DLDC_LLVM_LIBDIR=R\\\"(${LLVM_LIBRARY_DIRS})\\\"\"" LDC_CXXFLAGS) endif() # # LLD integration (requires headers & libs) # if(NOT DEFINED LDC_WITH_LLD) if(EXISTS "${LLVM_INCLUDE_DIRS}/lld/Common/Driver.h") set(LDC_WITH_LLD ON) else() set(LDC_WITH_LLD OFF) endif() endif() if(LDC_WITH_LLD) append("-DLDC_WITH_LLD" LDC_CXXFLAGS) endif() message(STATUS "-- Building LDC with integrated LLD linker (LDC_WITH_LLD): ${LDC_WITH_LLD}") message(STATUS "-- Building LDC with enabled assertions (LDC_ENABLE_ASSERTIONS): ${LDC_ENABLE_ASSERTIONS}") if(LDC_ENABLE_ASSERTIONS) append("-UNDEBUG" LDC_CXXFLAGS) # avoid MSVC warning D9025 about "-DNDEBUG ... -UNDEBUG" string(REGEX REPLACE "(^| )[/-]D *NDEBUG( |$)" "\\1-UNDEBUG\\2" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") string(REGEX REPLACE "(^| )[/-]D *NDEBUG( |$)" "\\1-UNDEBUG\\2" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}") string(REGEX REPLACE "(^| )[/-]D *NDEBUG( |$)" "\\1-UNDEBUG\\2" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") else() append("-DNDEBUG" LDC_CXXFLAGS) endif() # # Enable instrumentation for code coverage analysis # set(TEST_COVERAGE OFF CACHE BOOL "instrument compiler for code coverage analysis") if(TEST_COVERAGE) if(CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")) append("-O0 -g -fprofile-arcs -ftest-coverage" EXTRA_CXXFLAGS) list(APPEND LLVM_LDFLAGS "-lgcov") else() message(WARNING "Coverage testing is not available.") endif() endif() # # Set up the main ldc/ldc2 target. # set(LDC_LIB_LANGUAGE CXX) if(BUILD_SHARED) set(LDC_LIB_TYPE SHARED) else() set(LDC_LIB_TYPE STATIC) if("${D_COMPILER_ID}" STREQUAL "LDMD" AND D_COMPILER_FE_VERSION GREATER 2074) # Define a 'HOST_D' CMake linker language for the static LDCShared # library, using the host ldmd2 compiler ≥ v1.5 as archiver, which # supports LTO objects and cross-archiving. set(CMAKE_HOST_D_CREATE_STATIC_LIBRARY "\"${D_COMPILER}\" -lib ${D_COMPILER_FLAGS} ${DFLAGS_BASE} -of= ") set(LDC_LIB_LANGUAGE HOST_D) endif() endif() set(LDC_LIB LDCShared) set(LDC_LIB_EXTRA_SOURCES "") if(MSVC_IDE) # Visual Studio generator # Add the .d files as (Visual D) source files to this lib, so that they show up somewhere. set(LDC_LIB_EXTRA_SOURCES ${LDC_D_SOURCE_FILES}) set_property(SOURCE ${LDC_LIB_EXTRA_SOURCES} PROPERTY VS_TOOL_OVERRIDE "DCompile") # 'Clear' the original list for the custom commands below, producing ldc2.exe and ldc2-unittest.exe - # we still need a dummy .d file. set(LDC_D_SOURCE_FILES "${PROJECT_SOURCE_DIR}/dmd/root/man.d") # Mark this main library target as (bold) startup project for the generated Visual Studio solution. set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${LDC_LIB}) endif() add_library(${LDC_LIB} ${LDC_LIB_TYPE} ${LDC_CXX_SOURCE_FILES} ${LDC_LIB_EXTRA_SOURCES}) set_target_properties( ${LDC_LIB} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib${LIB_SUFFIX} ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib${LIB_SUFFIX} ARCHIVE_OUTPUT_NAME ldc LIBRARY_OUTPUT_NAME ldc RUNTIME_OUTPUT_NAME ldc COMPILE_FLAGS "${LLVM_CXXFLAGS} ${LDC_CXXFLAGS} ${EXTRA_CXXFLAGS}" LINKER_LANGUAGE ${LDC_LIB_LANGUAGE} LINK_FLAGS "${SANITIZE_LDFLAGS}" # Use a custom .props file to set up Visual D (import paths, predefined versions...). VS_USER_PROPS "${PROJECT_SOURCE_DIR}/cmake/VisualD.props" ) # LDFLAGS should actually be in target property LINK_FLAGS, but this works, and gets around linking problems target_link_libraries(${LDC_LIB} ${LLVM_LIBRARIES} ${LLVM_LDFLAGS}) if(WIN32) target_link_libraries(${LDC_LIB} imagehlp psapi) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") target_link_libraries(${LDC_LIB} dl) endif() if(LLVM_SPIRV_FOUND) target_link_libraries(${LDC_LIB} ${LLVM_SPIRV_LIBRARIES} ${LLVM_SPIRV_LDFLAGS}) endif() set(LDC_EXE_FULL ${PROJECT_BINARY_DIR}/bin/${LDC_EXE_NAME}${CMAKE_EXECUTABLE_SUFFIX}) set(LDMD_EXE_FULL ${PROJECT_BINARY_DIR}/bin/${LDMD_EXE_NAME}${CMAKE_EXECUTABLE_SUFFIX}) # Figure out how to link the main LDC executable, for which we need to take the # LLVM flags into account. set(LDC_LINKERFLAG_LIST ${SANITIZE_LDFLAGS} ${LLVM_LIBRARIES} ${LLVM_LDFLAGS}) if(MSVC) # Issue 1297 – set LDC's stack to 16 MiB for Windows builds (default: 1 MiB). list(APPEND LDC_LINKERFLAG_LIST "/STACK:16777216") # VS 2017+: Use undocumented /NOOPTTLS MS linker switch to keep on emitting # a .tls section. Required for older host druntime versions, otherwise the # GC TLS ranges are garbage starting with VS 2017 Update 15.3. if(MSVC_VERSION GREATER 1900 AND D_COMPILER_FE_VERSION LESS 2076) list(APPEND LDC_LINKERFLAG_LIST "/NOOPTTLS") endif() endif() if(LDC_WITH_LLD) if(MSVC) list(APPEND LDC_LINKERFLAG_LIST LLVMSymbolize.lib) else() set(LDC_LINKERFLAG_LIST -lLLVMSymbolize ${LDC_LINKERFLAG_LIST}) endif() if(MSVC) list(APPEND LDC_LINKERFLAG_LIST lldMinGW.lib lldCOFF.lib lldELF.lib lldMachO.lib lldWasm.lib lldCommon.lib) else() set(LDC_LINKERFLAG_LIST -llldMinGW -llldCOFF -llldELF -llldMachO -llldWasm -llldCommon ${LDC_LINKERFLAG_LIST}) endif() if(APPLE) # LLD 13.0.0 on Mac needs libxar list(APPEND LDC_LINKERFLAG_LIST -lxar) endif() if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") # FreeBSD LLVM port links to zstd, but does not convey this information via CMake # Workaround it here until it is fixed in the port find_package(zstd) list(APPEND LDC_LINKERFLAG_LIST "$") endif() endif() if(NOT DEFINED LDC_LINK_MANUALLY) if(MSVC) # Use the D host compiler for linking D executables. set(LDC_LINK_MANUALLY OFF) else() # On Unix-like systems, default to having CMake link the D executables via the C++ compiler. # (Using the D compiler needs -Xcc and -gcc support, see file BuildDExecutable.cmake.) set(LDC_LINK_MANUALLY ON) endif() endif() if(LDC_LINK_MANUALLY AND NOT DEFINED D_LINKER_ARGS) include(ExtractDMDSystemLinker) message(STATUS "Host D compiler linker program: ${D_LINKER_COMMAND}") message(STATUS "Host D compiler linker flags: ${D_LINKER_ARGS}") endif() # Plugin support if(UNIX) set(LDC_ENABLE_PLUGINS_DEFAULT ON) else() set(LDC_ENABLE_PLUGINS_DEFAULT OFF) endif() set(LDC_ENABLE_PLUGINS ${LDC_ENABLE_PLUGINS_DEFAULT} CACHE BOOL "Build LDC with plugin support (increases binary size)") if(LDC_ENABLE_PLUGINS) add_definitions(-DLDC_ENABLE_PLUGINS) if(APPLE) # Need to disable dead_strip with LDC host compilers. if("${D_COMPILER_ID}" STREQUAL "LDMD") if(LDC_LINK_MANUALLY) # suboptimal - applies to all D executables (incl. ldmd2, ldc-build-runtime, ldc-prune-cache) list(REMOVE_ITEM D_LINKER_ARGS "-Wl,-dead_strip") else() # just for ldc2 (and ldc2-unittest) append("-disable-linker-strip-dead" DFLAGS_LDC) endif() endif() elseif(UNIX) # For plugin support, we need to link with --export-dynamic on Unix. # Make sure the linker supports --export-dynamic (on Solaris it is not supported and also not needed). set(CMAKE_REQUIRED_QUIET_BAK ${CMAKE_REQUIRED_QUIET}) set(CMAKE_REQUIRED_QUIET ON) # suppress status messages CHECK_LINK_FLAG("--export-dynamic" LINKER_ACCEPTS_EXPORT_DYNAMIC_FLAG) set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_BAK}) if(LINKER_ACCEPTS_EXPORT_DYNAMIC_FLAG) set(LDC_LINKERFLAG_LIST "${LDC_LINKERFLAG_LIST};-Wl,--export-dynamic") else() message(WARNING "Linker does not accept --export-dynamic, user plugins may give missing symbol errors upon load") endif() endif() endif() message(STATUS "-- Building LDC with plugin support (LDC_ENABLE_PLUGINS): ${LDC_ENABLE_PLUGINS}") message(STATUS "-- Linking LDC with flags: ${ALTERNATIVE_MALLOC_O};${LDC_LINKERFLAG_LIST}") if(NOT WIN32 AND NOT CYGWIN) # Unify symbol visibility with LLVM to silence linker warning "direct access in function X to global # weak symbol Y means the weak symbol cannot be overridden at runtime. This was likely caused by # different translation units being compiled with different visibility settings." # See LLVM's cmake/modules/HandleLLVMOptions.cmake. check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG) if (LDC_ENABLE_PLUGINS AND NOT APPLE) # For plugins, we shouldn't apply this flag because it hides the inline methods of e.g. Visitor. On macOS it's OK to add. elseif (${SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG}) append("-fvisibility-inlines-hidden" LDC_CXXFLAGS) endif() endif() build_d_executable( "${LDC_EXE}" "${LDC_EXE_FULL}" "${LDC_D_SOURCE_FILES}" "${DFLAGS_BUILD_TYPE} ${DFLAGS_LDC}" "${ALTERNATIVE_MALLOC_O};${LDC_LINKERFLAG_LIST};${FULLY_STATIC_LDFLAG}" "${FE_RES}" "${LDC_LIB}" ${COMPILE_D_MODULES_SEPARATELY} ) if(MSVC_IDE) # the IDE generator is a multi-config one # so copy the config file into the correct bin subfolder # (different outputs no longer feasible for custom commands, so disabled) # add_custom_command(TARGET ${LDC_EXE} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/etc/${LDC_EXE}.conf $ COMMENT "Copy config file ${LDC_EXE}.conf") endif() # # LDMD # set_source_files_properties(driver/args.cpp driver/exe_path.cpp driver/ldmd.cpp driver/response.cpp PROPERTIES COMPILE_FLAGS "${LLVM_CXXFLAGS} ${LDC_CXXFLAGS}" COMPILE_DEFINITIONS LDC_EXE_NAME="${LDC_EXE_NAME}" ) add_library(LDMD_CXX_LIB ${LDC_LIB_TYPE} driver/args.cpp driver/exe_path.cpp driver/ldmd.cpp driver/response.cpp driver/args.h driver/exe_path.h) set_target_properties( LDMD_CXX_LIB PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib${LIB_SUFFIX} ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib${LIB_SUFFIX} ARCHIVE_OUTPUT_NAME ldmd LIBRARY_OUTPUT_NAME ldmd ) set(LDMD_D_SOURCE_FILES ${PROJECT_SOURCE_DIR}/dmd/root/man.d ${PROJECT_SOURCE_DIR}/driver/main.d) build_d_executable( "${LDMD_EXE}" "${LDMD_EXE_FULL}" "${LDMD_D_SOURCE_FILES}" "${DFLAGS_BUILD_TYPE}" "${LDC_LINKERFLAG_LIST};${FULLY_STATIC_LDFLAG}" "" "LDMD_CXX_LIB" ${COMPILE_D_MODULES_SEPARATELY} ) # Little helper. function(copy_and_rename_file source_path target_path) get_filename_component(source_name ${source_path} NAME) get_filename_component(target_dir ${target_path} DIRECTORY) file(MAKE_DIRECTORY ${target_dir}) # don't preserve source file permissions, see https://github.com/ldc-developers/ldc/issues/2337 file(COPY ${source_path} DESTINATION ${target_dir} NO_SOURCE_PERMISSIONS) file(RENAME ${target_dir}/${source_name} ${target_path}) endfunction() function(copy_and_install_llvm_library llvm_lib_path ldc_lib_name fixup_dylib) set(ldc_lib_path ${PROJECT_BINARY_DIR}/lib${LIB_SUFFIX}/${ldc_lib_name}) copy_and_rename_file(${llvm_lib_path} ${ldc_lib_path}) if (APPLE AND fixup_dylib) execute_process(COMMAND install_name_tool -id @rpath/${ldc_lib_name} ${ldc_lib_path} ERROR_VARIABLE INSTALL_NAME_TOOL_STDERR) if(${INSTALL_NAME_TOOL_STDERR} MATCHES "warning: changes being made to the file will invalidate the code signature") # Eat the warning, it's ok. elseif("${INSTALL_NAME_TOOL_STDERR}" STREQUAL "") else() message(WARNING "install_name_tool stderr: ${INSTALL_NAME_TOOL_STDERR}") endif() execute_process(COMMAND codesign --force -s - ${ldc_lib_path}) endif() install(FILES ${ldc_lib_path} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) endfunction() # # Locate LLVM's LTO binary and use it # if(WIN32 OR LLVM_IS_SHARED) set(LDC_INSTALL_LTOPLUGIN_DEFAULT OFF) else() set(LDC_INSTALL_LTOPLUGIN_DEFAULT ON) endif() set(LDC_INSTALL_LTOPLUGIN ${LDC_INSTALL_LTOPLUGIN_DEFAULT} CACHE BOOL "Copy/install the LTO plugin from the LLVM package when available.") if (LDC_INSTALL_LTOPLUGIN) if(APPLE) set(LLVM_LTO_BINARY ${LLVM_LIBRARY_DIRS}/libLTO.dylib) set(LDC_LTO_BINARY_NAME libLTO.dylib) elseif(UNIX) set(LLVM_LTO_BINARY ${LLVM_LIBRARY_DIRS}/LLVMgold.so) set(LDC_LTO_BINARY_NAME LLVMgold-ldc.so) endif() if(EXISTS ${LLVM_LTO_BINARY}) message(STATUS "-- Including LTO linker plugin (LDC_INSTALL_LTOPLUGIN): ON (${LLVM_LTO_BINARY})") copy_and_install_llvm_library(${LLVM_LTO_BINARY} ${LDC_LTO_BINARY_NAME} TRUE) else() message(STATUS "-- Including LTO linker plugin (LDC_INSTALL_LTOPLUGIN): OFF (cannot find ${LLVM_LTO_BINARY})") endif() else() message(STATUS "-- Including LTO linker plugin (LDC_INSTALL_LTOPLUGIN): ${LDC_INSTALL_LTOPLUGIN}") endif() # # Locate ASan and other LLVM compiler-rt libraries, and copy them to our lib # folder or save that folder in the config files. Location is typically # LLVM_LIBRARY_DIRS/clang//lib// , for example # LLVM_LIBRARY_DIRS/clang/4.0.0/lib/darwin/ , but we allow the user to specify # another directory. set(COMPILER_RT_BASE_DIR "${LLVM_LIBRARY_DIRS}/clang" CACHE PATH "Base path of compiler-rt libraries. If they in are /usr/lib/clang/17/lib/linux/libclang_rt* you should set this value to /usr/lib/clang") set(COMPILER_RT_LIBDIR "${COMPILER_RT_BASE_DIR}") if(LDC_LLVM_VER LESS 1600) set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/${LLVM_VERSION_BASE_STRING}") else() set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/${LLVM_VERSION_MAJOR}") endif() set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/lib") if(APPLE) set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/darwin") elseif(ANDROID) set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/linux") elseif(UNIX) set(COMPILER_RT_LIBDIR_OS_DEFAULT "${LLVM_HOST_TARGET}") # default when building compiler-rt alongside LLVM if(NOT EXISTS "${COMPILER_RT_LIBDIR}/${COMPILER_RT_LIBDIR_OS_DEFAULT}") # default when building compiler-rt separately: OS name alone in lowercase string(TOLOWER "${CMAKE_SYSTEM_NAME}" lowercase_CMAKE_SYSTEM_NAME) if(EXISTS "${COMPILER_RT_LIBDIR}/${lowercase_CMAKE_SYSTEM_NAME}") set(COMPILER_RT_LIBDIR_OS_DEFAULT "${lowercase_CMAKE_SYSTEM_NAME}") endif() endif() set(COMPILER_RT_LIBDIR_OS "${COMPILER_RT_LIBDIR_OS_DEFAULT}" CACHE STRING "Non-Mac Posix: OS used as directory name for the compiler-rt source libraries, e.g., 'freebsd'.") set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/${COMPILER_RT_LIBDIR_OS}") elseif(WIN32) set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/windows") endif() if(NOT EXISTS "${COMPILER_RT_LIBDIR}") message(WARNING "Expected compiler-rt directory '${COMPILER_RT_LIBDIR}' does not exist. To include PGO and sanitizers support, COMPILER_RT_BASE_DIR and/or COMPILER_RT_LIBDIR_OS might need to be set explicitly. See docs/compiler_rt.md.") endif() if(LLVM_IS_SHARED) set(LDC_INSTALL_LLVM_RUNTIME_LIBS_DEFAULT OFF) else() set(LDC_INSTALL_LLVM_RUNTIME_LIBS_DEFAULT ON) endif() set(LDC_INSTALL_LLVM_RUNTIME_LIBS ${LDC_INSTALL_LLVM_RUNTIME_LIBS_DEFAULT} CACHE BOOL "Copy/install LLVM compiler-rt libraries (ASan, libFuzzer, ...) from LLVM/Clang into LDC lib dir when available.") function(copy_compilerrt_lib llvm_lib_name ldc_lib_name fixup_dylib) set(llvm_lib_path ${COMPILER_RT_LIBDIR}/${llvm_lib_name}) if(EXISTS ${llvm_lib_path}) message(STATUS "-- - ${llvm_lib_path} --> ${ldc_lib_name}") copy_and_install_llvm_library(${llvm_lib_path} ${ldc_lib_name} ${fixup_dylib}) else() message(STATUS "-- - not found: ${llvm_lib_path}") endif() endfunction() message(STATUS "-- Including LLVM compiler-rt libraries (LDC_INSTALL_LLVM_RUNTIME_LIBS): ${LDC_INSTALL_LLVM_RUNTIME_LIBS}") if (LDC_INSTALL_LLVM_RUNTIME_LIBS) # Locate LLVM sanitizer runtime libraries, and copy them to our lib folder if(APPLE) copy_compilerrt_lib("libclang_rt.asan_osx_dynamic.dylib" "libldc_rt.asan.dylib" TRUE) copy_compilerrt_lib("libclang_rt.lsan_osx_dynamic.dylib" "libldc_rt.lsan.dylib" TRUE) copy_compilerrt_lib("libclang_rt.tsan_osx_dynamic.dylib" "libldc_rt.tsan.dylib" TRUE) copy_compilerrt_lib("libclang_rt.osx.a" "libldc_rt.builtins.a" FALSE) copy_compilerrt_lib("libclang_rt.profile_osx.a" "libldc_rt.profile.a" FALSE) copy_compilerrt_lib("libclang_rt.fuzzer_osx.a" "libldc_rt.fuzzer.a" FALSE) copy_compilerrt_lib("libclang_rt.xray_osx.a" "libldc_rt.xray.a" FALSE) copy_compilerrt_lib("libclang_rt.xray-basic_osx.a" "libldc_rt.xray-basic.a" FALSE) copy_compilerrt_lib("libclang_rt.xray-fdr_osx.a" "libldc_rt.xray-fdr.a" FALSE) copy_compilerrt_lib("libclang_rt.xray-profiling_osx.a" "libldc_rt.xray-profiling.a" FALSE) elseif(UNIX) set(LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH "" CACHE STRING "Non-Mac Posix: architecture used as libname suffix for the compiler-rt source libraries, e.g., 'aarch64'.") if(LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH STREQUAL "") set(compilerrt_suffix "") else() set(compilerrt_suffix "-${LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH}") endif() copy_compilerrt_lib("libclang_rt.asan${compilerrt_suffix}.a" "libldc_rt.asan.a" FALSE) copy_compilerrt_lib("libclang_rt.lsan${compilerrt_suffix}.a" "libldc_rt.lsan.a" FALSE) copy_compilerrt_lib("libclang_rt.msan${compilerrt_suffix}.a" "libldc_rt.msan.a" FALSE) copy_compilerrt_lib("libclang_rt.tsan${compilerrt_suffix}.a" "libldc_rt.tsan.a" FALSE) copy_compilerrt_lib("libclang_rt.builtins${compilerrt_suffix}.a" "libldc_rt.builtins.a" FALSE) copy_compilerrt_lib("libclang_rt.profile${compilerrt_suffix}.a" "libldc_rt.profile.a" FALSE) copy_compilerrt_lib("libclang_rt.xray${compilerrt_suffix}.a" "libldc_rt.xray.a" FALSE) copy_compilerrt_lib("libclang_rt.fuzzer${compilerrt_suffix}.a" "libldc_rt.fuzzer.a" FALSE) copy_compilerrt_lib("libclang_rt.xray-basic${compilerrt_suffix}.a" "libldc_rt.xray-basic.a" FALSE) copy_compilerrt_lib("libclang_rt.xray-fdr${compilerrt_suffix}.a" "libldc_rt.xray-fdr.a" FALSE) copy_compilerrt_lib("libclang_rt.xray-profiling${compilerrt_suffix}.a" "libldc_rt.xray-profiling.a" FALSE) elseif(WIN32) set(compilerrt_arch_suffix "x86_64") if(CMAKE_SIZEOF_VOID_P EQUAL 4) set(compilerrt_arch_suffix "i386") endif() if(LDC_LLVM_VER LESS 2000) copy_compilerrt_lib("clang_rt.asan-${compilerrt_arch_suffix}.lib" "ldc_rt.asan.lib" FALSE) copy_compilerrt_lib("clang_rt.lsan-${compilerrt_arch_suffix}.lib" "ldc_rt.lsan.lib" FALSE) else() copy_compilerrt_lib("clang_rt.asan_static_runtime_thunk-${compilerrt_arch_suffix}.lib" "ldc_rt.asan_static_runtime_thunk.lib" FALSE) copy_compilerrt_lib("clang_rt.asan_dynamic_runtime_thunk-${compilerrt_arch_suffix}.lib" "ldc_rt.asan_dynamic_runtime_thunk.lib" FALSE) copy_compilerrt_lib("clang_rt.asan_dynamic-${compilerrt_arch_suffix}.lib" "ldc_rt.asan.lib" FALSE) copy_compilerrt_lib("clang_rt.asan_dynamic-${compilerrt_arch_suffix}.dll" "clang_rt.asan_dynamic-${compilerrt_arch_suffix}.dll" FALSE) endif() copy_compilerrt_lib("clang_rt.builtins-${compilerrt_arch_suffix}.lib" "ldc_rt.builtins.lib" FALSE) copy_compilerrt_lib("clang_rt.profile-${compilerrt_arch_suffix}.lib" "ldc_rt.profile.lib" FALSE) copy_compilerrt_lib("clang_rt.fuzzer-${compilerrt_arch_suffix}.lib" "ldc_rt.fuzzer.lib" FALSE) endif() endif() # If everything else if insufficient, the user can specify # -DCOMPILER_RT_LIBDIR_CONFIG to embed an arbitrary value. if(NOT DEFINED COMPILER_RT_LIBDIR_CONFIG) if(NOT LDC_INSTALL_LLVM_RUNTIME_LIBS) set(COMPILER_RT_LIBDIR_CONFIG "${COMPILER_RT_LIBDIR}") endif() endif() if(DEFINED COMPILER_RT_LIBDIR_CONFIG) message(STATUS "Adding ${COMPILER_RT_LIBDIR_CONFIG} to lib-dirs in configuration file") set(OPTIONAL_COMPILER_RT_DIR "\n \"${COMPILER_RT_LIBDIR_CONFIG}\", // compiler-rt directory") endif() # # Auxiliary build and test utils. # add_subdirectory(utils) # auto-generate ldc/gccbuiltins_*.di headers, depending on LLVM version and enabled LLVM backends set(GCCBUILTINS "") if(TARGET gen_gccbuiltins) file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/import/ldc") function(gen_gccbuiltins name) set(module "${PROJECT_BINARY_DIR}/import/ldc/gccbuiltins_${name}.di") if (GCCBUILTINS STREQUAL "") set(GCCBUILTINS "${module}" PARENT_SCOPE) else() set(GCCBUILTINS "${GCCBUILTINS};${module}" PARENT_SCOPE) endif() add_custom_command( OUTPUT ${module} COMMAND gen_gccbuiltins ${module} "${name}" DEPENDS gen_gccbuiltins ) endfunction() set(target_arch "AArch64;AMDGPU;ARM;Mips;RISCV;NVPTX;PowerPC;SystemZ;X86") set(target_name "aarch64;amdgcn;arm;mips;riscv;nvvm;ppc;s390;x86") foreach(target ${LLVM_TARGETS_TO_BUILD}) list(FIND target_arch ${target} idx) if(idx GREATER -1) list(GET target_name ${idx} name) gen_gccbuiltins(${name}) endif() endforeach() add_custom_target(gccbuiltins DEPENDS ${GCCBUILTINS}) # make sure they are generated when building the compiler (as link-time dependency) add_dependencies(${LDC_EXE} gccbuiltins) endif() # # Auxiliary tools. # add_subdirectory(tools) # # Test and runtime targets. Note that enable_testing() is order-sensitive! # enable_testing() # LDC unittest executable (D unittests only). set(LDC_UNITTEST_EXE ${LDC_EXE}-unittest) set(LDC_UNITTEST_EXE_NAME ${PROGRAM_PREFIX}${LDC_UNITTEST_EXE}${PROGRAM_SUFFIX}) set(LDC_UNITTEST_EXE_FULL ${PROJECT_BINARY_DIR}/bin/${LDC_UNITTEST_EXE_NAME}${CMAKE_EXECUTABLE_SUFFIX}) build_d_executable( "${LDC_UNITTEST_EXE}" "${LDC_UNITTEST_EXE_FULL}" "${LDC_D_SOURCE_FILES}" "-g -unittest ${DFLAGS_LDC}" "${LDC_LINKERFLAG_LIST};${FULLY_STATIC_LDFLAG}" "" "${LDC_LIB}" ${COMPILE_D_MODULES_SEPARATELY} ) set_target_properties("${LDC_UNITTEST_EXE}" PROPERTIES EXCLUDE_FROM_ALL ON) add_test(NAME build-ldc2-unittest COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ldc2-unittest) add_test(NAME ldc2-unittest COMMAND ${LDC_UNITTEST_EXE_FULL} --version) set_tests_properties(ldc2-unittest PROPERTIES DEPENDS build-ldc2-unittest) set(_LDC_BUILD_RUNTIME_DEFAULT ON) if(CMAKE_CROSSCOMPILING) set(_LDC_BUILD_RUNTIME_DEFAULT OFF) endif() option(LDC_BUILD_RUNTIME "Build the runtime libraries" ${_LDC_BUILD_RUNTIME_DEFAULT}) if(LDC_BUILD_RUNTIME) add_subdirectory(runtime) else() message(STATUS "NOT building the runtime libraries (LDC_BUILD_RUNTIME=OFF)") endif() if(D_VERSION EQUAL 2) add_subdirectory(tests/dmd) endif() add_subdirectory(tests) # ldc-build-runtime tool configure_file(${PROJECT_SOURCE_DIR}/runtime/ldc-build-runtime.d.in ${PROJECT_BINARY_DIR}/ldc-build-runtime.d @ONLY) set(LDC_BUILD_RUNTIME_EXE ldc-build-runtime) set(LDC_BUILD_RUNTIME_EXE_NAME ${PROGRAM_PREFIX}${LDC_BUILD_RUNTIME_EXE}${PROGRAM_SUFFIX}) set(LDC_BUILD_RUNTIME_EXE_FULL ${PROJECT_BINARY_DIR}/bin/${LDC_BUILD_RUNTIME_EXE_NAME}${CMAKE_EXECUTABLE_SUFFIX}) build_d_executable( "${LDC_BUILD_RUNTIME_EXE}" "${LDC_BUILD_RUNTIME_EXE_FULL}" "${PROJECT_BINARY_DIR}/ldc-build-runtime.d" "${DFLAGS_BUILD_TYPE}" "" # must not be fully static for std.net.curl support (loading libcurl dynamically) "${PROJECT_SOURCE_DIR}/runtime/ldc-build-runtime.d.in" "" ${COMPILE_D_MODULES_SEPARATELY} ) # # Install target. # install(PROGRAMS ${LDC_EXE_FULL} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS ${LDMD_EXE_FULL} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install(PROGRAMS ${LDC_BUILD_RUNTIME_EXE_FULL} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) if(${BUILD_SHARED}) # For now, only install libldc if explicitly building the shared library. # While it might theoretically be possible to use LDC as a static library # as well, for the time being this just bloats the normal packages. install(TARGETS ${LDC_LIB} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") if(NOT DEFINED BASH_COMPLETION_COMPLETIONSDIR) find_package(bash-completion QUIET) if((NOT BASH_COMPLETION_FOUND) OR (NOT BASH_COMPLETION_PREFIX STREQUAL CMAKE_INSTALL_PREFIX)) set(BASH_COMPLETION_COMPLETIONSDIR "${CONF_INST_DIR}/bash_completion.d") if(LINUX_DISTRIBUTION_IS_GENTOO AND CMAKE_INSTALL_PREFIX STREQUAL "/usr") set(BASH_COMPLETION_COMPLETIONSDIR "/usr/share/bash-completion") endif() endif() endif() install(DIRECTORY packaging/bash_completion.d/ DESTINATION ${BASH_COMPLETION_COMPLETIONSDIR}) endif() # imports/includes install(FILES runtime/druntime/src/object.d runtime/druntime/src/__importc_builtins.di runtime/druntime/src/importc.h DESTINATION ${INCLUDE_INSTALL_DIR}) foreach(p core etc ldc) install(DIRECTORY runtime/druntime/src/${p} DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.d") install(DIRECTORY runtime/druntime/src/${p} DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.di") endforeach() install(DIRECTORY runtime/phobos/std DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.d") install(DIRECTORY runtime/phobos/etc DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.d") install(DIRECTORY runtime/jit-rt/d/ldc DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.d") install(FILES ${GCCBUILTINS} DESTINATION ${INCLUDE_INSTALL_DIR}/ldc) # # Packaging # include (CMakeCPack.cmake) include (CPack) ./ldc-1.41.0-src/.clang-format0000644000175000017500000000010315077210635016042 0ustar matthiasmatthiasBasedOnStyle: LLVM SortIncludes: false FixNamespaceComments: false ./ldc-1.41.0-src/CHANGELOG.md0000644000175000017500000030270215077210635015312 0ustar matthiasmatthias# LDC master #### Big news #### Platform support #### Bug fixes # LDC 1.41.0 (2025-06-07) #### Big news - Frontend, druntime and Phobos are at version [2.111.0+](https://dlang.org/changelog/2.111.0.html). (#4877, #4910, #4918, #4941) - Support for [LLVM 20](https://releases.llvm.org/20.1.0/docs/ReleaseNotes.html). The prebuilt packages use v20.1.5. (#4843, #4911, #4935) - The dynamic-compile (JIT) feature has regressed with LLVM 20. Use LLVM 18 or 19 for that feature. - Keep frame pointers by default with `-O` for some targets, notably AArch64 (except Windows), x86_64 (except Windows and glibc Linux), Windows x86, and Android. This fixes druntime backtraces with optimized code (incl. prebuilt druntime/Phobos). (#4889) - The prebuilt (non-musl) Linux packages are now generated on Ubuntu 22.04; the minimum glibc version has accordingly been raised from v2.31 to v2.35. (#4893) - druntime: Optimize `core.int128` via inline IR/assembly. (#4892) - Follow clang wrt. unwind tables emission, enabling them for most popular targets. (#4888) - ldc2.conf: Arrays can now be appended to via the `~=` operator. (#4848, #4856) - New `--installWithSuffix` command-line option for the `ldc-build-runtime` tool, to simplify copying the libraries to an existing LDC installation. (#4870) - CMake changes (for building LDC itself): - Minimum CMake version bumped to v3.16. (#4898) - macOS: Fix weird linker error when running CMake the first time. (#3901, #4926) - Reworked integration of the LLVM compiler-rt libraries. Package maintainers may want to see [docs/compiler_rt.md](https://github.com/ldc-developers/ldc/blob/master/docs/compiler_rt.md). (#4665) - Somewhat simplify separate compiler and runtime builds, incl. cross-compiling LDC itself. (#4872) #### Platform support - Supports LLVM 15 - 20. - RISC-V: Fiber context switching is now implemented natively. (#4867) #### Bug fixes - Prebuilt macOS packages: Fix `ldmd2` and other bundled executables crashing on macOS v15.4. (#4899, #4912) - ImportC: Run C preprocessor in C11 mode. (#4933) - ImportC Windows: Disable clang headers when C-preprocessing with `clang-cl`. (#4934) - Fix ICE on invalid constant address-of expressions. (#4938, #4939) - Allow Unicode in fully qualified label names. (#4927, #4929) # LDC 1.40.1 (2025-03-20) #### Big news - Frontend and druntime bumped to version [2.110.0](https://dlang.org/changelog/2.110.0.html) final. (#4854, #4868) - LLVM for prebuilt packages bumped to v19.1.7. (#4822) - New prebuilt package for Alpine Linux x86_64 with musl libc. It's currently generated on Alpine v3.21, using its default LLVM 19. Most bundled executables are fully static and can be run on ~all distros. (#4826, #4862) - Revived dynamic-compile (JIT) functionality (formerly unsupported since LLVM 12), supporting LLVM 18+ now. (#4774) - ldc2.conf: `%%ldcversion%%` placeholder added, allowing to refer to version-specific directories. - Windows: The prebuilt packages now bundle an official libcurl build (from https://curl.se/windows/), currently v8.12.1. The static library (`curl_a.lib`) isn't available anymore. When bundling this `libcurl.dll` with your binaries, make sure to include `curl-ca-bundle.crt` too (in the same directory as the DLL), to prevent 'SSL peer certificate or SSH remote key was not OK' exceptions. (#4855, #4875) #### Platform support - Supports LLVM 15 - 19. - Initial compiler and runtime support for ppc64 and ppc64le systems that use IEEE 754R 128-bit floating-point as the default 128-bit floating-point format. (#4833, #4840) - Initial support for Windows on ARM64. The prebuilt Windows multilib package/installer bundles prebuilt arm64 druntime and Phobos; cross-compiling works out of the box via `-mtriple=aarch64-windows-msvc`, but you currently need to set up a suited MSVC arm64 build environment before yourself (e.g., by running `vsdevcmd.bat -arch=arm64 -host_arch=x64`). (#4835, #4846) #### Bug fixes - Prebuilt macOS universal package: Fix automatic bundled `libLTO.dylib` usage when linking with LTO. (#4857) - Building multi-file D applications with control-flow protection will no longer cause LDC to throw an internal compiler error. (#4828) # LDC 1.40.0 (2024-12-15) #### Big news - Frontend, druntime and Phobos are at version [2.110.0](https://dlang.org/changelog/2.110.0.html). (#4707, #4737, #4749, #4768, #4784, #4792, #4798) - Support for [LLVM 19](https://releases.llvm.org/19.1.0/docs/ReleaseNotes.html). The prebuilt packages use v19.1.3 (incl. macOS arm64). (#4712, #4735, #4763, #4772) - Objective-C: The compiler now properly supports Objective-C classes and protocols, as well as swift stub classes (via the `@swift` UDA). (#4777) - Android: NDK for prebuilt package bumped from r26d to r27c. (#4711, #4772) - ldc2.conf: `%%ldcconfigpath%%` placeholder added - specifies the directory where current configuration file is located. (#4717) - Add support for building against a system copy of zlib through `-DPHOBOS_SYSTEM_ZLIB=ON`. (#4742) - Emscripten: The compiler now mimicks a musl Linux platform wrt. extra predefined versions (`linux`, `Posix`, `CRuntime_Musl`, `CppRuntime_LLVM`). (#4750) #### Platform support - Supports LLVM 15 - 19. #### Bug fixes - Fix potentially corrupt IR layouts for bit fields. (#4646, #4708) - Fix potentially corrupt IR layouts for explicitly under-aligned aggregates, a regression introduced in LDC v1.31. (#4734, #4736) - ELF: Emit (most) instantiated symbols in COMDATs for proper link-time culling. (#3589, #4748) - Support scalar right-hand-sides when bit-shifting vectors. (#3606, #4781) - Fix LLVM data layout for the SPIR-V target used in D-Compute on LLVM 19+. (#4772) # LDC 1.39.0 (2024-07-04) #### Big news - Frontend, druntime and Phobos are at version [2.109.1](https://dlang.org/changelog/2.109.0.html). (#4660, #4692) - LLVM for prebuilt packages bumped to v18.1.6 (except for macOS arm64). (#4678) - Added CI testing of Alpine Linux with musl libc (including some bug fixes). Removed the libunwind dependency when linking with musl libc. (#4650, #4691) #### Platform support - Supports LLVM 15 - 18. Support for LLVM 11 - 14 was dropped. The CLI options `-passmanager` and `-opaque-pointers` were removed. # LDC 1.38.0 (2024-05-11) #### Big news - Frontend, druntime and Phobos are at version [2.108.1](https://dlang.org/changelog/2.108.0.html). (#4591, #4615, #4619, #4622, #4623, #4640) - Support for [LLVM 18](https://releases.llvm.org/18.1.0/docs/ReleaseNotes.html). The prebuilt packages use v18.1.5 (except for macOS arm64). (#4599, #4605, #4607, #4604, #4628, #4642) - Android: Switch to native ELF TLS, supported since API level 29 (Android v10), dropping our former custom TLS emulation (requiring a modified LLVM and a legacy ld.bfd linker). The prebuilt packages themselves require Android v10+ (armv7a) / v11+ (aarch64) too, and are built with NDK r26d. Shared druntime and Phobos libraries are now available (`-link-defaultlib-shared`), as on regular Linux. (#4618) - Please don't use the official macOS arm64 package (incl. the universal package on arm64) to cross-compile to Android. That package still uses our previous LLVM v17.0.6, which still includes the custom TLS emulation, but druntime expects native TLS now on Android. Resort to the x86_64 package in that case. #### Platform support - Supports LLVM 11 - 18. #### Bug fixes - Android: Support the lld linker. (#3918) # LDC 1.37.0 (2024-03-03) #### Big news - Frontend, druntime and Phobos are at version [2.107.1](https://dlang.org/changelog/2.107.0.html). (#4563, #4577, #4587) #### Bug fixes - Fix if-statement elision on constant true/false condition. (#4556, #4559) # LDC 1.36.0 (2024-01-06) #### Big news - Frontend, druntime and Phobos are at version [2.106.1](https://dlang.org/changelog/2.106.0.html). (#4522, #4539, #4551) - Support for [LLVM 17](https://releases.llvm.org/17.0.1/docs/ReleaseNotes.html). The prebuilt packages use v17.0.6. (#4533, #4540) - New command-line options `-fno-{exceptions,moduleinfo,rtti}` to selectively enable some `-betterC` effects. (#4522) - New command-line option `-fprofile-sample-use` for using sample-based profile data for optimization. Functionality and usage is identical to Clang's option with same name. (#4531) - New `ldc-profgen` tool for sample-based PGO, a copy of LLVM's [llvm-profgen](https://llvm.org/docs/CommandGuide/llvm-profgen.html). (#4536) #### Platform support - Supports LLVM 11.0 - 17.0. # LDC 1.35.0 (2023-10-15) #### Big news - Frontend, druntime and Phobos are at version [2.105.2+](https://dlang.org/changelog/2.105.0.html). (#4476, #4498, #4513) - The Windows installer now supports non-admin installs *without* an explicit `/CURRENTUSER` switch. (#4495) #### Platform support - Initial compiler support for LoongArch64. druntime support is pending. (#4500) #### Bug fixes - ImportC: - Fix `static` linkage. (#4484, #4487) - Make gcc builtins available. (#4483) - Apple: Support weird `asm("_" "")` mangling stuff. (#4485, #4486) - AArch64: Fix an ABI-related ICE. (#4489, #4490) - Fix GC2Stack optimization regression introduced in v1.24. (#4510, #4511) - Fix druntime ABI divergence when compiling with sanitizers support. (#4508, #4509) - Windows: Fix an instance of missed backslash-escaping in `-ftime-trace` JSON. (#4506, #4507) # LDC 1.34.0 (2023-08-26) #### Big news - Frontend, druntime and Phobos are at version [2.104.2](https://dlang.org/changelog/2.104.0.html). (#4440) - Support for [LLVM 16](https://releases.llvm.org/16.0.0/docs/ReleaseNotes.html). The prebuilt packages use v16.0.6. (#4411, #4423) - We have come across miscompiles with LLVM 16's newly-enabled-by-default function specializations (on Win64 and macOS). To be on the safe side, LDC disables them by default for all targets via `-func-specialization-size-threshold=1000000000` in `etc/ldc2.conf` (and separately for LTO on Posix platforms). To enable the function specializations, explicitly override it with e.g. `-func-specialization-size-threshold=100` (the LLVM 16 default) and, for LTO on Posix, a similar LTO plugin option in the linker cmdline (see linker cmdline with `-v`). #### Platform support - Supports LLVM 11.0 - 16.0. Support for LLVM 9 and 10 was dropped. - 64-bit RISC-V: Now defaults to `-mattr=+m,+a,+f,+d,+c` ('rv64gc' ABI) for non-bare-metal targets, i.e., if the target triple includes a valid operating system. (#4390) #### Bug fixes - Fix function pointers/delegates on Harvard architectures (e.g., AVR). (#4432, #4465) # LDC 1.33.0 (2023-07-23) #### Big news - Frontend, druntime and Phobos are at version [2.103.1](https://dlang.org/changelog/2.103.0.html), incl. new command-line option `-verror-supplements`. (#4345) - The `--plugin` commandline option now also accepts semantic analysis plugins. Semantic analysis plugins are recognized by exporting the symbol: `extern(C) void runSemanticAnalysis(Module m)`. The plugin's `runSemanticAnalysis` function is called for each module, after all other semantic analysis steps (also after DCompute SemA), just before object codegen. (#4430) - New tool `ldc-build-plugin` that helps compiling user plugins. It downloads the correct LDC source version (if it's not already available), and calls LDC with the correct commandline flags to build a plugin. (#4430) - New commandline option `-femit-local-var-lifetime` that enables variable lifetime (scope) annotation to LLVM IR codegen. Lifetime annotation enables stack memory reuse for local variables with non-overlapping scope. (#4395) - C files are now automatically preprocessed using the external C compiler (configurable via `-gcc` or the `CC` environment variable, and `-Xcc` for extra flags). Extra preprocessor flags (e.g., include dirs and manual defines) can be added via new command-line option `-P`. (#4417) - Windows: If `clang-cl.exe` is on `PATH`, it is preferred over Microsoft's `cl.exe` by default (e.g., to avoid printing the C source file name to stderr during preprocessing). - Less pedantic checks for conflicting C(++) function declarations when compiling multiple modules to a single object file ('Error: Function type does not match previously declared function with the same mangled name'). The error now only appears if an object file actually references multiple conflicting functions. (#4420) - New command-line option `--fcf-protection`, which enables Intel's Control-Flow Enforcement Technology (CET). (#4437) #### Platform support - Supports LLVM 9.0 - 15.0. #### Bug fixes - Handle potential lambda mangle collisions across separately compiled object files (and the linker then silently picking an arbitrary implementation). Lambdas (and their nested global variables) are now internal to each referencing object file (`static` linkage in C). (#4415) # LDC 1.32.2 (2023-05-12) #### Big news - New command-line option `--fwarn-stack-size=` with LLVM 13+. (#4378) - New command-line option `--fsplit-stack` for incremental stack allocations, see https://llvm.org/docs/SegmentedStacks.html. (#4379) - New UDA `ldc.attributes.noSplitStack` disables it on a per-function basis. (#4382) - New command-line option `--indent` for the `timetrace2txt` tool. (#4391) #### Bug fixes - Fix potentially huge compile slowdowns with `-g` and LLVM 15+. (#4354, #4393) - Treat *all* LLVM warnings as regular warnings (e.g., errors with `-w`). Requires LLVM 13+. (#4384) # LDC 1.32.1 (2023-04-17) #### Big news - The prebuilt Linux packages are now generated on a Ubuntu 20.04 box, so the min required `glibc` version has been raised from 2.26 to 2.31. (#4367) #### Bug fixes - Fix empty `ldc.gccbuiltins_*` modules with LLVM 15+. (#4347, #4350) - Fix v1.31 regression wrt. potentially wrong constant pointer offsets. (#4362, #4365) - Windows: Fix v1.32 regression wrt. leaking `Throwable.info` backtraces. (#4369) - Fix C assert calls for newlib targets. (#4351) # LDC 1.32.0 (2023-03-12) #### Big news - Frontend, druntime and Phobos are at version [2.102.2](https://dlang.org/changelog/2.102.0.html). (#4323, #4341) - LLVM for prebuilt packages bumped to v15.0.7. (#4311) - Linker-level dead code elimination is enabled by default for Apple, wasm and *all* ELF targets too now. (#4320) - Vector comparisons (==, !=, <, <=, >, >=) now yield a vector mask. Identity comparisons (`is`, `!is`) still yield a scalar `bool`. (3a59ee81) - New `timetrace2txt` tool for easier inspection of `--ftime-trace` output. (#4335) - `--ftime-trace` now also traces CTFE execution: the start expression of CTFE and function calls during CTFE. (#4339) #### Platform support - Supports LLVM 9.0 - 15.0. - Now supports `-mabi` for RISC-V targets. (#4322) #### Bug fixes - GC closures including variables with alignment > 16 bytes are now properly aligned. (ef8ba481) - Fix regression with LLVM 13+: some errors in inline assembly don't stop compilation. (#4293, #4331) # LDC 1.31.0 (2022-02-11) #### Big news - Frontend, druntime and Phobos are at version [2.101.2](https://dlang.org/changelog/2.101.0.html). (#4141, #4279) - Bit fields support. (#4015) - macOS on Apple M1: linking with `-g` is working again without unaligned pointer warnings/errors. This fixes file:line debug information in exception backtraces (requiring `atos`, a macOS development tool installed with Xcode), without the need to set MACOSX_DEPLOYMENT_TARGET=11 and using a modified LLVM. (#4291) - *Preliminary* support for LLVM 15, incl. adding support for the 'new' pass manager (`-passmanager`) and opaque IR pointers (`-opaque-pointers`). (way too many PRs to list!) - New command-line option `-fno-delete-null-pointer-checks`, mimicking the same option of GCC and Clang. (#4297) - New UDA `ldc.attributes.callingConvention("...")`, which overrides the default calling convention. For expert use only! (#4299) - New command-line option `-fno-discard-value-names` to keep value names in LLVM IR. (#4012) - dcompute: Support for OpenCL image I/O. (#3835) #### Platform support - Initial ABI support for 64-bit RISC-V. (#4007) #### Bug fixes - dcompute: Fix v1.29 regression when trying to use intrinsics. (#4266, #4267) - Fix 64-bit symbol offsets. (#4264, #4283) - Add missing 32-bit LTO versions of druntime & Phobos to Linux multilib package. (#4234, #4235) - Fix compiler crash. (#4130, #4135) #### Internals - The former druntime and dmd-testsuite git submodules are now part of the LDC repo directly, leaving Phobos as single remaining submodule. We are now using a subset of the DMD repo (which includes druntime since v2.101), rewritten via `git filter-repo` and exposed as `dmd-rewrite-*` branches/tags in the LDC repo, to merge newer frontend+druntime+tests from upstream DMD. The `tests/d2/dmd-testsuite` dir was moved to `tests/dmd`. (#4274, #4276) # LDC 1.30.0 (2022-07-20) #### Big news - Frontend, druntime and Phobos are at version [2.100.1](https://dlang.org/changelog/2.100.0.html). (#3970, #4008, #4009) - LLVM for prebuilt packages bumped to v14.0.3. (#3952, #3979) - All LLVM targets are enabled now (=> more targets for cross-compilation). - For the Mac package, the minimum supported macOS version has been raised to v10.12. - The minimum D version for bootstrapping has been raised to v2.079 (for GDC: v9.4), in line with DMD. (#3956) - The minimum LLVM version has been raised to v9.0. (#3960) - New LeakSanitizer support via `-fsanitize=leak` (not (yet?) supported on Windows). (#4005) - New prebuilt *universal* macOS package, runnable on both x86_64 and arm64, and enabling x86_64/arm64 macOS/iOS cross-compilation targets out of the box (`-mtriple={x86_64,arm64}-apple-{macos,ios12.0}`). The x86_64 package doesn't bundle any arm64 libs anymore; the arm64 package newly bundles iOS libs (arm64). (#3958) - Avoid an external x86_64-only dub, use the bundled universal dub executable instead. #### Platform support - Supports LLVM 9.0 - 14.0. #### Bug fixes - Enable output of variable names in ASan and MSan error reporting. (#4004) - Report unexpected type repaints as fatal ICEs instead of crashing. (#3990, #3991) #### Internals - Main CI was moved from Azure Pipelines to GitHub Actions. Any fork on GitHub can trivially reuse the fully automated prebuilt packages generation & upload to a GitHub release. (#3978) # LDC 1.29.0 (2022-04-08) #### Big news - Frontend, druntime and Phobos are at version [2.099.1](https://dlang.org/changelog/2.099.0.html). (#3917, #3893, #3937, #3953) - Support for LLVM 13 and 14. The prebuilt packages use v13.0.1. (#3842, #3951) - On Linux, LDC doesn't default to the `ld.gold` linker anymore. The combination of LLVM 13+ and older gold linkers can apparently cause problems. We recommend using LLD, e.g., via `-linker=lld` or by setting your default `/usr/bin/ld` symlink; it's significantly faster too. - `-linkonce-templates` is less aggressive by default now and IMHO production-ready. (#3924) - When linking manually (not via LDC) against *shared* druntime, it is now required to link the bundled `lib/ldc_rt.dso.o[bj]` object file into each binary. It replaces the previously Windows-specific `dso_windows.obj`. (#3850) - Breaking `extern(D)` ABI change for all targets: formal parameters of non-variadic functions aren't reversed anymore, in line with the spec. For 32-bit x86, the *first* parameter is accordingly now potentially passed in EAX, not the last one. So non-variadic `extern(D)` functions with multiple explicit parameters will break if expecting parameters in specific registers or stack slots, e.g., naked DMD-style inline assembly. (#3873, ldc-developers/phobos@3d725fce8f0acb78bf6cb984a8462e81e8e1b715) #### Platform support - Supports LLVM 6.0 - 14.0. - Basic compiler support for Newlib targets, i.e., triples like `arm-none-newlibeabi`. (#3946) #### Bug fixes - Linux: Make LTO work with LLD. (#3786, #3850) - Windows: Fix most undefined symbols with `-dllimport=all` without `-linkonce-templates`. (#3916, #3923, #3926, #3927, #3928, #3931, #3932) - Capture NRVO variable by ref for stack closures. (#3883, #3902) - `-ftime-trace`: JSON-escape filenames. (#3947, #3948) - RISC-V: Use 128-bit quadruple `real`. (#3892) # LDC 1.28.1 (2022-01-13) #### Big news - Frontend, druntime and Phobos are at version [2.098.1+](https://dlang.org/changelog/2.098.0.html). (#3886, #3896) - New `@hidden` UDA (as counterpart of `export`). (#3855) - Support 'raw mangles' via leading `\1` in `pragma(mangle)` strings, e.g., to access magic linker symbols on Mac. (#3854) - New `@noSanitize` UDA to selectively disable sanitizer instrumentation of functions. (#3889) - WebAssembly: Larger default stack size (1 MB) and protection against stack overflow overwriting global memory. (#3882) #### Bug fixes - Linux x86/x64: Fix TLS range with static druntime and bfd/lld linkers. (#3849, https://github.com/ldc-developers/druntime/commit/ec3c0aafbf4b6f3345e276e21a26ffee077470cf) - Support `rdtscp` in DMD-style inline assembly. (#3895) # LDC 1.28.0 (2021-10-20) #### Big news - Frontend, druntime and Phobos are at version [2.098.0+](https://dlang.org/changelog/2.098.0.html). (#3821, #3839, #3844, #3852) - Windows: `-dllimport=defaultLibsOnly` (e.g., implied by `-link-defaultlib-shared -fvisibility=hidden`) doesn't require `-linkonce-templates` anymore. (#3816) - dcompute: Add support for OpenCL image I/O. (#3835) #### Platform support - Supports LLVM 6.0 - 12.0. #### Bug fixes - Fix dynamic casts across binary boundaries (DLLs etc.). (dlang/druntime#3543) - Windows: Fix potentially wrongly caught exceptions due to non-unique `TypeInfo_Class` names. (#3520) - Don't silently ignore invalid external tool specifications. (#3841) - LLVM v11.1: Add missing PGO `ldc-profdata` tool. # LDC 1.27.1 (2021-08-14) #### Big news - Frontend, druntime and Phobos are at version [2.097.2](https://dlang.org/changelog/2.097.0.html). (#3811) - Revamped and improved `-ftime-trace` implementation for compiler profiling/tracing, now excluding LLVM-internal traces, adding frontend memory tracing, source file location infos etc. (#3797) - An official prebuilt package for Linux AArch64 is available again after migrating from Shippable to Travis. (#3733) #### Bug fixes - ICE for 64-bit targets with 32-bit pointer size. (#3802, #3808) - Implement `core.atomic.pause()` for some architectures. (#3806, #3807) # LDC 1.27.0 (2021-07-31) #### Big news - Frontend, druntime and Phobos are at version [2.097.1+](https://dlang.org/changelog/2.097.0.html). (#3741, #3770, #3771, #3790, #3794, #3796, #3799) **(new)** - LLVM for prebuilt packages bumped to **v12.0.1**, and Linux base image to Ubuntu 18.04. Unfortunately, the dynamic-compile (JIT) functionality is lost this way - it needs some [more work](https://github.com/ldc-developers/ldc/pull/3184) to adapt to a newer LLVM API. (#3701, #3789) - Prebuilt packages now bundle [reggae](https://github.com/atilaneves/reggae), a meta build tool to generate [ninja](https://github.com/ninja-build/ninja/releases)/make build files for dub projects (and more). Building large projects with many dependencies can be significantly sped-up via parallelization and dependency tracking for incremental builds. (#3739) Basic [usage](https://github.com/atilaneves/reggae#d-projects-and-dub-integration), in a dub project dir (containing a `dub.{sdl,json}` file): ``` reggae -b ninja|make --dc=ldc2 # only needed the first time or when adding source files ninja|make [-j] ``` - Greatly improved **DLL support on Windows**, making it almost as easy as on Posix: - `-fvisibility=public` now also affects Windows, exporting all defined symbols as on Posix, without explicit `export` visibility. Compiling a DLL with `-shared` now defaults to `-fvisibility=public` for consistency with Posix. (#3703) - This paved the way for druntime and Phobos DLLs, now bundled with prebuilt Windows packages and linkable via `-link-defaultlib-shared` (default with `-shared`, consistent with Posix targets). Previous hacks to partially accomodate for multiple, statically linked druntimes and Phobos in a single process (GC proxy etc.) aren't required any longer. With `-link-defaultlib-shared`, LDC now defaults to `-mscrtlib=msvcrt`, linking against the shared MSVC runtime. (ldc-developers/druntime#197, #3704, ldc-developers/druntime#198) - Limitation: TLS variables cannot be accessed directly across DLL boundaries. This can be worked around with an accessor function, e.g., ldc-developers/druntime@5d3e21a35d. - Non-TLS `extern(D)` global variables *not* defined in a root module are `dllimport`ed (with `-fvisibility=public`, or - restricted to druntime/Phobos symbols - with `-link-defaultlib-shared`). Compiling all modules of a DLL at once thus avoids linker warnings about 'importing locally defined symbol'. When linking a DLL against a static library, the static library may likely need to be compiled with `-fvisibility=public` to make its globals importable from the DLL. There's a new `-dllimport` option for explicit control. (#3763) - Caveat: symbols aren't uniqued across the whole process, so can be defined in multiple DLLs/executables, each with their own address, so you cannot rely on TypeInfos, instantiated symbols and functions to have the same address for the whole process. - When linking manually (not via LDC), binaries linked against druntime DLL need to include new `lib\dso_windows.obj`. - To restore the previous behavior of `-shared`, add `-fvisibility=hidden -link-defaultlib-shared=false`. - Windows: ANSI color codes can now be enforced for redirected stderr via `-enable-color`. (#3744) - Prebuilt Linux and Mac packages now use the [mimalloc](https://github.com/microsoft/mimalloc) allocator, significantly increasing compiler performance in some cases. (#3758, #3759) - The prebuilt macOS x64 package now bundles *shared* druntime/Phobos libs for iOS too. (#3764) - Possibly more performant *shared* Phobos library by compiling to a single object file with implicit cross-module inlining. (#3757) - New `-cov-increment` option for more performant coverage count execution. (#3724) - `-fsanitize=memory`: Bundle according LLVM compiler-rt library and add new `-fsanitize-memory-track-origins` option. (#3751) - New LDC-specific language addition: `__traits(initSymbol, )` with semantics equivalent to `TypeInfo.initializer()`, but circumventing the `TypeInfo` indirection and thus e.g. also usable for `-betterC` code. (#3774, ldc-developers/druntime#201) #### Platform support - Supports LLVM 6.0 - 12.0. #### Bug fixes - Fix debuginfo source file paths, e.g., including directories in exception stack traces. (#3687) - Fix potentially corrupt context pointers for nested functions with `-linkonce-templates`. (#3690, #3766) - Predefine version `CppRuntime_Gcc` for musl targets. (#3769) - RVO: In-place construct `.__ctor()`. (#3778, #3779) - `-linkonce-templates`: Make sure special struct TypeInfo members are semantically analyzed before emitting the `TypeInfo`. (#3783) # LDC 1.26.0 (2021-04-28) #### Big news - Frontend, druntime and Phobos are at version [2.096.1+](https://dlang.org/changelog/2.096.0.html), incl. new `ldmd2` command-line option `-gdwarf=` (use `-dwarf-version` for `ldc2`). (#3678, #3706) #### Platform support - Supports LLVM 6.0 - 12.0. #### Bug fixes - v1.25 regression: TypeInfo for interface gives invalid string for name. (#3693) - Make enums show up correctly as members of a struct when debugging. (#3688, #3694) - Some new GCC builtins are available in `ldc.gccbuiltins_*`, by not rejecting LLVM `i1` anymore (mapping to D `bool` instead). Thanks Bruce! (#3682) - dcompute: Don't reject CUDA versions 7.x - 8.0.0. (#3683) - Don't enforce the frame pointer for functions with GCC-style inline asm. (#3685) - `-i`: Exclude `ldc.*` modules by default. (#3679) - Fix some cases of insufficient alignment for arguments and parameters. (#3692, #3698) - Fix a few issues with LLVM 12. (#3697, #3708) # LDC 1.25.0 (2021-02-21) #### Big news - Frontend, druntime and Phobos are at version [2.095.1](https://dlang.org/changelog/2.095.0.html), incl. new command-line option `-makedeps`. (#3620, #3658, #3668) - Support for **LLVM 12** and LLVM 11.1. (#3663, ldc-developers/druntime#195) - LLVM for prebuilt packages bumped to v11.0.1. (#3639) - New prebuilt package for **native macOS/arm64** ('Apple silicon'). (#3666) - LDC invocations can now be nicely profiled via `--ftime-trace`. (#3624) - Struct TypeInfos are emitted into *referencing* object files only, and special TypeInfo member functions into the owning object file only. (#3491) - Windows: - New CI-automated [Windows installer](https://github.com/ldc-developers/ldc/releases/download/v1.25.0/ldc2-1.25.0-windows-multilib.exe) corresponding to the multilib package. (#3601) - Bundled MinGW-based libs bumped to MinGW-w64 v8.0.0. (#3605) - Bundled libcurl upgraded to v7.74.0. (#3638) - Breaking ABI changes: - `extern(D)`: Pass non-PODs by ref to temporary. (#3612) - Win64: Pass/return delegates like slices - in (up to) 2 GP registers. (#3609) - Win64 `extern(D)`: Pass/return Homogeneous Vector Aggregates in SIMD registers. (#3610) - `-linkonce-templates` comes with a new experimental template emission scheme and is now suited for projects consisting of multiple object files too. It's similar to C++, emitting templated symbols into *each* referencing compilation unit with optimizer-discardable `linkonce_odr` linkage. The consequences are manifold - each object file is self-sufficient wrt. templated symbols, naturally working around any template-culling bugs and also meaning increased opportunity for inlining and less need for LTO. The probably biggest advantage is that the optimizer can discard unused `linkonce_odr` symbols early instead of optimizing and forwarding to the assembler. So this is especially useful to **decrease compilation times with `-O`** and can at least in some scenarios greatly outweigh the (potentially very much) higher number of symbols defined by the glue layer - on my box, building optimized dub (all-at-once) is 28% faster with `-linkonce-templates`, and building the optimized Phobos unittests (per module) 56% faster. Libraries compiled with `-linkonce-templates` can generally *not* be linked against dependent code compiled without `-linkonce-templates`; the other way around works. (#3600) - Emit function/delegate literals as `linkonce_odr`, as they are emitted into each referencing compilation unit too. (#3650) - Exploit ABI specifics with `-preview=in`. (#3578) - Musl: Switch to cherry-picked libunwind-based backtrace alternative. (#3641, ldc-developers/druntime#192) #### Platform support - Supports LLVM 6.0 - 12.0. #### Bug fixes - Fix LTO with `-link-internally`. The prebuilt Windows packages don't bundle an external `lld-link.exe` LLD linker anymore. (#2657, #3604) - Add source location information for `TypeInfo` diagnostics with `-betterC`. (#3631, #3632) - Keep init symbols of built-in `TypeInfo` classes mutable just like any other TypeInfo, so that e.g. `synchronized()` can be used on the implicit monitor. (#3599) - Windows: Fix colliding EH TypeDescriptors for exceptions with the same `TypeInfo_Class` name. (#3501, #3614) - Predefine version `FreeStanding` when targeting bare-metal. (#3607, #3608) - druntime: Define `rt.aaA.AA` as naked pointer, no struct wrapper. (#3613) - Misc. fixes and improvements for the CMake scripts, incl. new defaults for `LDC_INSTALL_{LTOPLUGIN,LLVM_RUNTIME_LIBS}`. (#3647, #3655, #3654, #3673) - `-cleanup-obj`: Put object files into unique temporary directory by default. (#3643, #3660) - druntime: Add missing `core.atomic.atomicFetch{Add,Sub}`. (#3646, ldc-developers/druntime#193) - Fix regression wrt. non-deleted temporary `-run` executable. (#3636) #### Internals - Ignore `-enable-cross-module-inlining` if inlining is generally disabled. (#3664) - Travis CI ported to GitHub Actions (excl. Linux/AArch64). (#3661, #3662) # LDC 1.24.0 (2020-10-24) #### Big news - Frontend, druntime and Phobos are at version [2.094.1+](https://dlang.org/changelog/2.094.0.html), incl. new command-line options `-cov=ctfe`, `-vtemplates=list-instances` and `-HC=` . (#3560, #3582, #3588, #3593) - Support for **LLVM 11**. The prebuilt packages use v11.0.0; x86 packages newly include the LLVM backend for AMD GPUs. (#3546, #3586) - Experimental support for **macOS on 64-bit ARM**, thanks Guillaume! All druntime/Phobos unit tests pass. The macOS package includes prebuilt druntime/Phobos; adapt the SDK path in `etc/ldc2.conf` and then use `-mtriple=arm64-apple-macos` to cross-compile. (dlang/druntime#3226, #3583) #### Platform support - Supports LLVM 6.0 - 11.0. #### Bug fixes - Fix potentially wrong context pointers when calling delegate literals. (#3553, #3554) - Fix alignment issue when casting vector rvalue to static array. (c8889a9219) - Make sure lambdas in `pragma(inline, true)` functions are emitted into each referencing compilation unit. (#3570) - Fix `-Xcc=-Wl,...` by dropping support for comma-separated list of `cc` options. (c61b1357ed) - Fix ThreadSanitizer support by not detaching main thread upon program termination. (#3572) - Traverse full chain of nested aggregates when resolving a nested variable. (#3556, #3558) #### Internals - CI: Linux AArch64 is now also tested by a Travis job, because Shippable has sadly become unreliable. (#3469) - Building LDC with an LDC host compiler might be somewhat faster now (requires `-DLDC_LINK_MANUALLY=OFF` in the CMake command-line on non-Windows hosts). (#3575) # LDC 1.23.0 (2020-08-19) #### Big news - Frontend, druntime and Phobos are at version [2.093.1+](https://dlang.org/changelog/2.093.0.html), incl. new command-line option `-vtemplates`. (#3476, #3538, #3541) - Min required LLVM version raised to v6.0, dropping support for v3.9-5.0. (#3493) - LLVM for prebuilt packages bumped to v10.0.1. (#3513) - The prebuilt Mac package now also includes prebuilt druntime/Phobos for the iOS/x86_64 simulator, making cross-compilation work out of the box with `-mtriple=x86_64-apple-ios12.0`. (#3478) - Windows: New `-gdwarf` CLI option to emit DWARF debuginfos for MSVC targets, e.g., for debugging with gdb/lldb. (#3533) - New `-platformlib` CLI option to override the default linked-with platform libraries, e.g., when targeting bare-metal. (#3374, #3475) #### Platform support - Supports LLVM 6.0 - 10.0. #### Bug fixes - Fix regression since v1.22: shared druntime potentially overriding libstdc++ symbols and breaking exceptions in C++ libraries. (#3530, #3537) - Fix naked DMD-style asm emission for non-Mac x86 Darwin targets (e.g., iOS simulators). (#3478) - `-betterC`: Don't use unsupported EH for handling clean-ups. (#3479, #3482) - dcompute: Fix wrong address space loads and stores. Thx Rob! (#3428) - Fix ICE wrt. missing IR declarations for some forward-declared functions. (#3496, #3503) - Fix ICE wrt. inline IR and empty parameter types tuple. (#3509) - Fix PGO issues. (#3375, #3511, #3512, #3524) - Improve support for LLVM's ThreadSanitizer. (#3522) - Fix linker cmdline length limitation via response files. (#3535, #3536) #### Internals - Compiler performance wrt. string literals emission has been improved. Thx @looked-at-me! (#3490, #3492) - Link libstdc++ statically for `libldc-jit.so` of prebuilt Linux packages, to increase portability. (#3473, #3474) - Set up Visual D when using the Visual Studio CMake generator, making LDC compiler development on Windows a smooth out-of-the-box experience. (#3494) # LDC 1.22.0 (2020-06-16) #### Big news - Frontend, druntime and Phobos are at version [2.092.1+](https://dlang.org/changelog/2.092.0.html). (#3413, #3416, #3429, #3434, #3452, #3467) - **AArch64**: All known ABI issues have been fixed. C(++) interop should now be on par with x86_64, and variadics usable with `core.{vararg,stdc.stdarg}`. (#3421) - Windows hosts: DMD's Visual C++ toolchain detection has been adopted. As that's orders of magnitude faster than the previous method involving the MS batch file, auto-detection has been enabled by default, so if you have a non-ancient Visual C++ installation, it will now be used automatically for linking. The environment setup has been reduced to the bare minimum (`LIB` and `PATH`). (#3415) - **FreeBSD** x64: CI with CirrusCI is now fully green and includes automated prebuilt package generation. The package depends on the `llvm` ports package and should currently work on FreeBSD 11-13. (#3453, #3464) - Link-time overridable `@weak` functions are now emulated for Windows targets and work properly for ELF platforms. For ELF, LDC doesn't emit any COMDATs anymore. (#3424) - New `ldc.gccbuiltins_{amdgcn,nvvm}` for AMD GCN and NVIDIA PTX targets. (#3411) - druntime: Significant speed-up for `core.math.ldexp`. (#3440, #3446) #### Platform support - Supports LLVM 3.9 - 10.0. #### Bug fixes - Cross-module inlining (incl. `pragma(inline, true)`): Enable emission into multiple object files. This may have a significant impact on performance (incl. druntime/Phobos) when not using LTO. (#3126, #3442) - Android: Fix TLS initialization regression (introduced in v1.21) and potential alignment issues. Unfortunately, the `ld.bfd` linker is required for our custom TLS emulation scheme, unless you're willing to use a custom linker script. So `-linker=bfd` is the new default for Android targets. (#3462) - Casting (static and dynamic) arrays to vectors now loads the data instead of splatting the first element. (#3418, #3419) - Fix return statements potentially accessing memory from destructed temporaries. (#3426) - Add proper support for `-checkaction=halt`. (#3430, #3431) - druntime: Include `core.stdcpp.*` modules. (#3103, #3158) - GCC-style asm: Add support for indirect input operands (`"m"`). (#3438) - FreeBSD: Fix backtraces for optimized code by switching to external `libexecinfo`. (#3108, #3453) - FreeBSD: Fix C math related issues (incl. CTFE math issues) by bringing `core.stdc.{math,tgmath}` up to speed. (dlang/druntime#3119) - Fix ICE for captured parameters not passed on the LLVM level. (#3441) - Convenience fixes for RISC-V and other exotic targets. (#3457, #3460) #### Internals - When printing compile-time reals to hex strings (mangling, .di headers), LDC now uses LLVM instead of the host C runtime, for proper and consistent results. (#3410) - One limitation for exotic hosts wrt. C `long double` precision has been lifted. (#3414) - For AVR targets, the compiler now predefines `AVR` and emits all TLS globals as regular `__gshared` ones. (#3420) - WebAssembly: New memory grow/size intrinsics. (ldc-developers/druntime#187) - New `-fno-plt` option to avoid PLT external calls. (#3443) - iOS/arm64 CI, running the debug druntime & Phobos unittests on an iPhone 6S. Thx Jacob for this tedious work! (#3379, #3450) # LDC 1.21.0 (2020-04-23) #### Big news - Frontend, druntime and Phobos are at version [2.091.1+](https://dlang.org/changelog/2.091.1.html), incl. new CLI switches `-verror-style` and `-HC`, `-HCd`, `-HCf`. (#3333, #3399) - **iOS** (incl. watchOS and tvOS) support has landed in druntime and Phobos (thanks Jacob!). All unittests are green on iOS/arm64. The prebuilt macOS package includes prebuilt druntime & Phobos libraries for iOS/arm64, for first `-mtriple=arm64-apple-ios12.0` cross-compilation experiments. (#3373) - LLVM for prebuilt packages upgraded to v10.0.0. Android NDK version bumped to r21. (#3307, #3387, #3398) - Initial support for **GCC/GDC-style inline assembly** syntax, besides DMD-style inline asm and LDC-specific `__asm`, enabling to write inline asm that is portable across GDC/LDC and corresponds to the GCC syntax in C. See ldc-developers/druntime#171 for examples wrt. how to transition from `__asm` to similar GCC-style asm. (#3304) - Inline assembly diagnostics have been extended by the D source location. (#3339) - **Android**: - Revamped druntime initialization, fixing related issues for i686/x86_64 targets, enabling the usage of the `ld.gold` linker (bfd isn't required anymore) as well as getting rid of the D `main()` requirement. (#3350, #3357, ldc-developers/druntime#178) - Reduced size for shared libraries by compiling druntime and Phobos with hidden visibility. (#3377) #### Platform support - Supports LLVM 3.9 - 10.0. #### Bug fixes - Fixed tail calls in thunks, affecting **AArch64** (the debug libraries now work) and possibly other architectures. (#3329, #3332) - Windows: Do not emit any column infos for CodeView by default (like clang) & add `-gcolumn-info`. (#3102, #3388) - Windows: Do not leak MSVC-environment-setup into `-run` child processes. A new `LDC_VSDIR_FORCE` environment variable can be used to enforce MSVC toolchain setup. (#3340, #3341) - Windows: Fix memory leak when throwing exceptions in threads. (#3369, ldc-developers/druntime#181) - Try to use `memcmp` for (in)equality of non-mutable static arrays and mutable slices. (#3400, #3401) - `ldc.gccbuiltins_*`: Lift 256-bit vector limit, adding 174 AVX512 builtins for x86; 512-bit vector aliases have been added to `core.simd`. (#3405, #3406) #### Internals - `core.bitop.{bts,btr,btc}` are now CTFE-able. (ldc-developers/druntime#182) - Do not fallback to host for critical section size of unknown targets. (#3389) - Linux: Possibility to avoid passing `-fuse-ld` to `cc` via `-linker=`. (#3382) - WebAssembly: Switch from legacy linked-list ModuleInfo registry to `__minfo` section. (#3348) - Windows: Bundled libcurl upgraded to v7.69.1, incl. the option to link it statically. (#3378) - Windows: Switch to wide `wmain` C entry point in druntime. (#3351) - druntime unittests are now compiled with `-checkaction=context`. #### Known issues - When building LDC, old LDC 0.17.*/ltsmaster host compilers miscompile LDC ≥ 1.21, leading to potential segfaults of the built LDC. Ltsmaster can still be used to bootstrap a first compiler and then let that compiler compile itself. (#3354) # LDC 1.20.1 (2020-03-07) #### Bug fixes - Non-Windows: Revert to strong `ModuleInfo.importedModules` references for correct module constructors execution order. (#3346, #3347) # LDC 1.20.0 (2020-02-14) #### Big news - Frontend, druntime and Phobos are at version [2.090.1+](https://dlang.org/changelog/2.090.1.html). (#3262, #3296, #3306, #3317, #3326) - Codegen preparations for: - iOS/tvOS/watchOS on AArch64. Thanks Jacob! (#3288) - WASI (WebAssembly System Interface) (#3295) - The config file for multilib builds has been restructured by adding a separate section for the multilib target. This avoids `--no-warn-search-mismatch` for the linker and enables support for LLD. (#3276) - Support for embedding `pragma({lib,linkerDirective}, ...)` in Mach-O object files. (#3259) E.g., `pragma(linkerDirective, "-framework", "CoreFoundation");` makes Apple's linker pull in that framework when pulling in the compiled object file. ELF object files newly embed `pragma(lib, ...)` library names in a special `.deplibs` section, but that only works with LLD 9+ for now. - The `ldc-build-runtime` tool has been slightly revised; `--dFlags` now extends the base D flags instead of overriding them. (1200601d44280d5f948a577b444ffa2dd4f9e433) - `ModuleInfo.importedModules` are now emitted as weak references (except on Windows, for LLD compatibility), following DMD. (#3262) - Windows: Bundled MinGW-based libs now support wide `wmain` and `wWinMain` C entry points. (#3311) #### Platform support - Supports LLVM 3.9 - 10.0. #### Bug fixes - Potential stack overflows on Linux in GC worker threads. (#3127, dlang/druntime#2904) - Support 2 leading dashes (not just 1) in command-line pre-parsing, thus fixing config file section lookup when using `--mtriple` and not ignoring `--conf` and `--lowmem` any longer. (#3268, #3275) - Support for data directives in DMD-style inline asm. (#3299, #3301) - Cherry-picked fixes for soft-float targets. (#3292, dlang/phobos#7362, dlang/phobos#7366, dlang/phobos#7377) - ICE during debuginfo generation for function literals inside enum declarations. (#3272, #3274) #### Internals - Misc. tweaks for `dmd-testsuite`: (#3287, #3306) - Significantly accelerated by skipping uninteresting permutations. - Switch from Makefile to `run.d`, incl. moving LDC-specific exceptions from Makefile to individual test files and support for extended `DISABLED` directives. - Addition of (recommendable!) Cirrus CI service (incl. FreeBSD) and removal of Semaphore CI. (#3298) - Some improvements for `gdmd` host compilers, incl. CI tests. (#3286) # LDC 1.19.0 (2019-12-20) #### Big news - Frontend, druntime and Phobos are at version [2.089.1+](https://dlang.org/changelog/2.089.1.html). (#3192, #3210, #3215, #3232, #3242, #3255, #3261) - LLVM for prebuilt packages upgraded to v9.0.1; our fork has moved to [ldc-developers/llvm-project](https://github.com/ldc-developers/llvm-project). The x86[_64] packages newly include the experimental **AVR** backend. (#3244) - **Android**: A prebuilt AArch64 package has been added. It also includes prebuilt druntime/Phobos libraries for x86_64; the armv7a package includes the i686 libraries. So all 4 Android targets are covered with prebuilt druntime/Phobos. (#3244) - Breaking `extern(D)` ABI change for Posix x86[_64]: non-POD arguments are now passed by ref under the hood, just like they already were for `extern(C++)`. Some superfluous implicit blits have been optimized away as well, for all targets. (#3204) - Posix: Defaults to `cc` now for linking, not `gcc` (or `clang` for FreeBSD 10+) - if the `CC` environment variable isn't set. Override with `-gcc=`. (#3202) - Codegen elision of dead branches for `if` statements with constant condition (not depending on enabled LLVM optimizations). (#3134) - druntime: New `llvm_sideeffect` intrinsic, new `@cold` function UDA and extended CAS functionality in `core.atomic` (incl. support for weak CAS and separate failure ordering). (https://github.com/ldc-developers/druntime/pull/166, https://github.com/ldc-developers/druntime/pull/167, #3220) - Windows: Bundled MinGW-based libs have been upgraded to use the .def files from MinGW-w64 v7.0.0. They now also contain a default `DllMain` entry point as well as `_[v]snprintf`. ([libs](https://github.com/ldc-developers/mingw-w64-libs/releases/tag/v7.0.0-rc.1), #3142) #### Platform support - Supports LLVM 3.9 - 9.0. #### Bug fixes - Misc. CMake issues with some LLVM 9 configurations. (#3079, #3198) - Equality/identity comparisons of vectors with length ≥ 32. (#3208, #3209) - `ldc.gccbuiltins_*` druntime modules now available to non-installed compiler too. (#3194, #3201) - Potential ICE when applying `@assumeUsed` on global union. (#3221, #3222) - `Context from outer function, but no outer function?` regression introduced in v1.11 (inability to access outer context from `extern(C++)` methods). (#3234, #3235) - Lvalue expressions with nested temporaries to be destructed yielding a wrong lvalue. (#3233) - druntime: Cherry-picked fix wrt. GC potentially collecting objects still referenced in other threads' TLS area. (dlang/druntime#2558) # LDC 1.18.0 (2019-10-16) #### Big news - Frontend, druntime and Phobos are at version [2.088.1](https://dlang.org/changelog/2.088.1.html). (#3143, #3161, #3176, #3190) - Support for **LLVM 9.0**. The prebuilt packages have been upgraded to [LLVM 9.0.0](http://releases.llvm.org/9.0.0/docs/ReleaseNotes.html). (#3166) - Preliminary **Android** CI, incl. experimental prebuilt armv7a package generation (API level 21, i.e., Android 5+). (#3164) - Bundled dub upgraded to v1.17.0+ with improved LDC support, incl. cross-compilation (e.g., `--arch=x86_64-pc-windows-msvc`). (https://github.com/dlang/dub/pull/1755, [Wiki](https://wiki.dlang.org/Cross-compiling_with_LDC)) - Init symbols of zero-initialized structs are no longer emitted. (#3131) - druntime: DMD-compatible `{load,store}Unaligned` and `prefetch` added to `core.simd`. (https://github.com/ldc-developers/druntime/pull/163) - JIT improvements, incl. multi-threaded compilation. (#2758, #3154, #3174) #### Platform support - Supports LLVM 3.9 - 9.0. #### Bug fixes - Don't error out when initializing a `void` vector. (#3130, #3139) - druntime: Fix exception chaining for latest MSVC runtime v14.23, shipping with Visual Studio 2019 v16.3. (https://github.com/ldc-developers/druntime/pull/164) - Keep lvalue-ness when casting associative array to another AA. (#3162, #3179) # LDC 1.17.0 (2019-08-25) #### Big news - Frontend, druntime and Phobos are at version [2.087.1+](https://dlang.org/changelog/2.087.1.html). (#3093, #3124) - The upstream fix wrt. [local templates can now receive local symbols](https://issues.dlang.org/show_bug.cgi?id=5710) hasn't been ported yet. (#3125) - LLVM for prebuilt packages upgraded to v8.0.1. (#3113) - Breaking change: Init symbols, TypeInfos and vtables of non-`export`ed aggregates are now hidden with `-fvisibility=hidden`. (#3129) - LLVM 8+: New intrinsics `llvm_*_sat` (saturation arithmetic) and `llvm_{min,max}imum`. Thanks Stefanos! (https://github.com/ldc-developers/druntime/pull/161, https://github.com/ldc-developers/druntime/pull/162) #### Platform support - Supports LLVM 3.9 - 8.0. #### Bug fixes - Fix for v1.16.0 regression when returning `void` expressions. (#3094, #3095) - `-lowmem` (and on Windows, `--DRT-*` options) in response files (e.g., used by dub) aren't ignored anymore. (#3086) - Windows: LDC and LDMD now internally use UTF-8 strings only, incl. command-line options and environment variables. The LDC install dir, source file names etc. can now contain non-ASCII chars. For proper console output, especially to stderr, you'll need Windows 10 v1809+ and may need to set a Unicode console font (e.g., Consolas). (#611, #3086) - Android: Linker errors when building LDC/LDMD should be fixed. (#3128) - Support for recent `gdmd` as D host compiler. Thanks Moritz! (#3087) - Do not require gold plugin when linking with LLD. (#3105) - Enable linker stripping on FreeBSD (with non-`bfd` linkers). (#3106) - Some JIT bind fixes. (#3099, #3100) #### Known issues - If you encounter segfaults in GC worker threads with shared druntime on Linux that are fixed by disabling new parallel GC marking (e.g., via `--DRT-gcopt=parallel:0` in executable cmdline), please let us know about it: #3127 # LDC 1.16.0 (2019-06-20) #### Big news - Frontend, druntime and Phobos are at version [2.086.1](https://dlang.org/changelog/2.086.1.html), incl. a DIP1008 fix. (#3062, #3076, #3091) - Non-Windows x86: Faster `real` versions of `std.math.{tan,expi}`. (#2855) - dcompute: New `__traits(getTargetInfo, "dcomputeTargets")`. (#3090) #### Platform support - Supports LLVM 3.9 - 8.0 (incl. 7.1). #### Bug fixes - Make `pragma(LDC_no_typeinfo)` actually elide TypeInfo emission for structs, classes and interfaces. (#3068) - Windows: Fix DLL entry point in MinGW-based libs. (https://github.com/ldc-developers/mingw-w64-libs/commit/8d930c129daa798379b3d563617847f8e895f43e) - WebAssembly: Use `--export-dynamic` when linking with LLD 8+. (#3023, #3072) - Fix corrupt `this` in functions nested in in/out contracts. (45460a1) - Fix identity comparisons of integral vectors. (a44c78f) - Improved handling of unsupported vector ops. (a44c78f) - uClibc: Fix C assert calls. (#3078, #3082) - Improved error message on global variable collision. (#3080, #3081) # LDC 1.15.0 (2019-04-06) #### Big news - Frontend, druntime and Phobos are at version **2.085.1**, incl. new command-line options `-preview`, `-revert`, `-checkaction=context`, `-verrors-context` and `-extern-std`. (#3003, #3039, #3053) - The Objective-C improvements from DMD 2.085 are not implemented. (#3007) - Support for **LLVM 8.0**. The prebuilt packages have been upgraded to LLVM 8.0.0 and include the Khronos SPIRV-LLVM-Translator, so that dcompute can now emit **OpenCL** too. (#3005) - Compiler memory requirements can now be reduced via the new `-lowmem` switch, which enables the garbage collector for the front-end and sacrifices compile times for less required memory. In some cases, the overall max process memory can be reduced by more than 60%; see https://github.com/ldc-developers/ldc/pull/2916#issuecomment-443433594 for some numbers. (#2916) - Note for package maintainers: this feature requires a recent D host compiler (most notably, it doesn't work with ltsmaster), ideally LDC 1.15 itself due to important GC memory overhead improvements in 2.085 druntime. - Support for generic `@llvmAttr("name")` parameter UDAs, incl. new `@restrict` with C-like semantics. (#3043) - macOS: 32-bit support was dropped in the sense of not being CI-tested anymore and the prebuilt macOS package now containing x86_64 libraries only. `MACOSX_DEPLOYMENT_TARGET` for the prebuilt package has been raised from 10.8 to 10.9. - Prebuilt packages don't depend on libtinfo and libedit anymore. (#1827, #3019) - x86: SSSE3 isn't required for the prebuilt packages and generated optimized binaries anymore. (#3045) #### Platform support - Supports LLVM 3.9 - 8.0. #### Bug fixes - Implicit cross-module-inlining of functions annotated with `pragma(inline, true)` without explicit `-enable-cross-module-inlining` has been restored. (#2552, #3014) - Propagate well-known length of newly allocated dynamic arrays for better optimizability. (#3041, #3042) - JIT: Support implicit `__chkstk` calls for Windows targets, e.g., for large stack allocations. (#3051) #### Internals - Addition of **Azure Pipelines** as CI service. It is the new main CI service and responsible for creating all prebuilt x86(_64) packages. AppVeyor has been dropped completely and CircleCI rededicated. (#2998) # LDC 1.14.0 (2019-02-17) #### Big news - Frontend, druntime and Phobos are at version **2.084.1**, incl. new command-line options `-mixin`, `-{enable,disable}-switch-errors` and `-checkaction`. (#2946, #2977, #2999) - Options `-release`, `-d-debug` and `-unittest` don't override preceding, more specific options (`-{enable,disable}-{asserts,invariants,preconditions,postconditions,contracts}`) anymore. - Linking WebAssembly doesn't require `-link-internally` (integrated LLD) anymore; an external linker (default: `wasm-ld`, override with `-linker`) can be used as well. (#2951) - Prebuilt Windows packages include LTO-able 32-bit druntime/Phobos too (previously: Win64 only). - AddressSanitizer support for fibers (requires [rebuilding the runtime libraries](https://wiki.dlang.org/Building_LDC_runtime_libraries) with CMake option `RT_SUPPORT_SANITIZERS=ON`). (#2975, https://github.com/ldc-developers/druntime/pull/152) - Support `pragma(LDC_extern_weak)` for function declarations - if the function isn't available when linking, its address is null. (#2984) #### Platform support - Supports LLVM 3.9 - 7.0. #### Bug fixes - Fix C++ mangling regression for functions with multiple `real` parameters introduced with v1.13, preventing to build DMD. (#2954, https://github.com/dlang/dmd/pull/9129) - Fix context of some nested aggregates. (#2960, #2969) - Support templated LLVM intrinsics with vector arguments. (#2962, #2971) - Avoid crashes with `-allinst` (fix emission of only speculatively nested functions). (#2932, #2940) - Fix XRay support for LLVM 7+. (#2965) - AArch64: Fix DMD-style profile measurements. (#2950) - Be less picky about placement of pragmas (allow intermediate `extern(C)` etc.). (#2599) - MSVC: Fix `real` C++ mangling to match Visual C++ `long double`. (#2974) - Fix bad ICE noticed when building protobuf-d. (#2990, #2992) - Fix ICE when directly indexing vector return value. (#2988, #2991) - Fix identity comparisons of complex numbers. (#2918, #2993) - MIPS32 fix for `core.stdc.stdarg`. (#2989, https://github.com/ldc-developers/druntime/pull/153) - Fix `core.atomic.cas()` for 64-bit floating-point values. (#3000, #3001) #### Known issues - Buggy older `ld.bfd` linker versions may wrongly strip out required symbols, e.g., ModuleInfos (so that e.g. no module ctors/dtors are run). LDC defaults to `ld.gold` on Linux. # LDC 1.13.0 (2018-12-16) #### Big news - Frontend, druntime and Phobos are at version **2.083.1**. (#2878, #2893, #2920, #2933) - The **Windows packages are now fully self-sufficient**, i.e., a Visual Studio/C++ Build Tools installation isn't required anymore, as we now ship with MinGW-w64-based libraries, similar to DMD. Check out the included [README.txt](https://github.com/ldc-developers/ldc/blob/master/packaging/README.txt) for all relevant details. (https://github.com/dlang/installer/pull/346, https://github.com/ldc-developers/ldc/pull/2886, [Wiki: Cross-compiling with LDC](https://wiki.dlang.org/Cross-compiling_with_LDC)) - Debug info improvements: * For GDB: printing global and imported symbols, non-member and member function calls. (#2826) * For Visual Studio and mago: names, by-value params, nested variables. (#2895, #2908, #2909, #2912) * Associative arrays now showing up properly (at least with mago), not as opaque `void*` anymore. (#2869) * `-gc` now translates D names to C++ ones, e.g., to use the regular Visual Studio debugger (bypassing mago) and as preparation for VS Code debugging with Microsoft's C/C++ plug-in ([screenshots](https://github.com/ldc-developers/ldc/pull/2869#issuecomment-427862154)). Thanks to Oleksandr for this contribution and the AA fix! (#2869) - New command-line option `-fvisibility=hidden` to hide functions/globals not marked as `export` (for non-Windows targets), primarily to reduce the size of shared libraries. Thanks to Andrey for stepping up! (#2894, #2923) - Dropped support for LLVM 3.7 and 3.8. (#2872) - LLVM for prebuilt packages upgraded to [v7.0.1](https://github.com/ldc-developers/llvm/releases/tag/ldc-v7.0.1). - Linux: now defaulting to `ld.gold` linker in general, not just with `-flto=thin`, as buggy older `ld.bfd` versions may wrongly strip out required symbols (change with `-linker`). (#2870) - Improved support for Android/x86[_64], musl libc and FreeBSD/AArch64. (#2917, https://github.com/ldc-developers/druntime/pull/146) - LDC-specific druntime: `ldc.simd.inlineIR` moved/renamed to `ldc.llvmasm.__ir` (with deprecated legacy alias). (#2931) - New CMake option `COMPILE_D_MODULES_SEPARATELY` builds D files in the DDMD frontend separately to reduce the time required to build LDC with many CPU cores and/or for iterative development. (#2914) #### Platform support - Supports LLVM 3.9 - 7.0. - Alpine linux/x64: built against Musl libc to support Docker images based on the Alpine distro, requires the `llvm5-libs`, `musl-dev`, `binutils-gold` and `gcc` packages to build and link D apps and the `tzdata` and `curl-dev` packages for certain stdlib modules. #### Bug fixes - 32-bit Android/ARM regression introduced in v1.12. (#2892) - Non-Windows x86_64 ABI fixes wrt. what's passed in registers, relevant for C[++] interop. (#2864) - Alignment of `scope` allocated class instances. (#2919) # LDC 1.12.0 (2018-10-13) #### Big news - Frontend, druntime and Phobos are at version **2.082.1**. (#2818, #2837, #2858, #2873) - Significant performance improvements for some transcendental `std.math` functions in single and double precision, at least for x86. (https://github.com/dlang/phobos/pull/6272#issuecomment-373967109) - Support for **LLVM 7**, which is used for the prebuilt packages. Due to an LLVM 7.0.0 [regression](https://bugs.llvm.org/show_bug.cgi?id=38289), the prebuilt x86[_64] LDC binaries require a **CPU with SSSE3**, and so will your optimized binaries (unless compiling with `-mattr=-ssse3`). (#2850) - **JIT compilation**: new `ldc.dynamic_compile.bind` function with interface similar to C++ `std::bind`, allowing to generate efficient specialized versions of functions (much like [Easy::jit](https://github.com/jmmartinez/easy-just-in-time) for C++). (#2726) - LTO now working for Win64 too; the prebuilt package includes the required external LLD linker and the optional LTO default libs. Enable as usual with `-flto= [-defaultlib=druntime-ldc-lto,phobos2-ldc-lto]`. (#2774) - Config file: new `lib-dirs` array for directories to be searched for libraries, incl. LLVM compiler-rt libraries. (#2790) #### Platform support - Supports LLVM 3.7 - 7.0. - Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017. - Alpine linux/x64: built against Musl libc to support Docker images based on the Alpine distro, requires the `llvm5-libs`, `musl-dev`, and `gcc` packages to build and link D apps and the `tzdata` and `libcurl` packages for certain stdlib modules. - Android/ARM: This release slightly changes the way emulated TLS is interfaced, but is missing a patch for 32-bit ARM. [See the wiki for instructions on patching that file manually before cross-compiling the runtime libraries for 32-bit Android/ARM](https://wiki.dlang.org/Build_D_for_Android). #### Bug fixes - Fix IR-based PGO on Windows (requires our LLVM fork). (#2539) - Fix C++ class construction with D `new` on Posix. (#2801) - Android: No more text relocations in Phobos zlib, required for API level 23+. (#2822, #2835) - Declare extern const/immutable globals as IR constants. (#2849, #2852) - Fix issue when emitting both object and textual assembly files at once (`-output-o -output-s`). (#2847) - Support address of struct member as key/value in AA literal. (#2859, #2860) - Fix ICE when computing addresses relative to functions/labels. (#2865, #2867) # LDC 1.11.0 (2018-08-18) #### Big news - Frontend, druntime and Phobos are at version **2.081.2**. (#2752, #2772, #2776, #2791, #2815) - Add some support for classes without TypeInfos, for `-betterC` and/or a minimal (d)runtime. (#2765) - LLVM for prebuilt packages upgraded to v6.0.1. The x86_64 packages feature some more LLVM targets for cross-compilation (experiments): MIPS, MSP430, RISC-V and WebAssembly. (#2760) - Rudimentary support for compiling & linking directly to **WebAssembly**. See the [dedicated Wiki page](https://wiki.dlang.org/Generating_WebAssembly_with_LDC) for how to get started. (#2766, #2779, #2785) - **AArch64** (64-bit ARM) now mostly working on Linux/glibc and Android. Current `ltsmaster`/0.17.6 is able to bootstrap v1.11, which can also bootstrap itself; most tests pass. (Preliminary) [CI](https://app.shippable.com/github/ldc-developers/ldc/dashboard) has been set up. (#2802, #2817, #2813) - LDC on Windows now uses 80-bit **compile-time** `real`s. This allows for seamless cross-compilation to other x86(_64) targets, e.g., without `real.min` underflowing to 0 and `real.max` overflowing to infinity. (#2752) - New `@naked` UDA in `ldc.attributes` & enhanced functionality for `@llvmAttr("")`. (#2773) #### Platform support - Supports LLVM 3.7 - 6.0. - Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017. #### Bug fixes - `extern(C++)` on Posix: Pass non-PODs indirectly by value. (#2728) - `extern(C++)` on Windows/MSVC: Methods return *all* structs via hidden sret pointer. (#2720, #1935) - Make GC2Stack IR optimization pass work as intended. (#2750) - Work around inline assembly regression with LLVM 6 on Win32. The prebuilt Win32 package is now using LLVM 6.0.1 too. (#2629, #2770) - Fix overzealous check for multiple `main()` functions. (#2778) - Fix corrupt prefix in integrated LLD's console output. (#2781) - No context ptr for nested non-`extern(D)` functions. (#2808, #2809) # LDC 1.10.0 (2018-06-19) #### Big news - Frontend, druntime and Phobos are at version **2.080.1**. (#2665, #2719, #2737) - No support for Objective-C class/static methods yet. (#2670) - Breaking Win64 `extern(D)` ABI change: Pass vectors directly in registers, analogous to the MS vector calling convention. (#2714) - Config file: For cross-compilation, support additional sections named as regex for specific target triples, e.g., `"86(_64)?-.*-linux": { … };`; see the comment in `etc/ldc2.conf`. (#2718) #### Platform support - Supports LLVM 3.7 - 6.0. - Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017. #### Bug fixes - CMake and druntime fixes for DragonFlyBSD, thanks Diederik! (#2690, #2691, #2692, https://github.com/ldc-developers/druntime/pull/138, https://github.com/ldc-developers/druntime/pull/139, https://github.com/ldc-developers/phobos/pull/64) - DMD-style inline asm label naming issue in overloaded functions. (#2667, #2694) - Linux: misc. exception stack trace fixes & extensions, incl. default DWARF v4 debuginfo emission with LLVM 6. (#2677) - Predefine version `D_HardFloat` instead of `D_SoftFloat` for `-float-abi=softfp`. (#2678) - Bash completion installed to the wrong place with custom `CMAKE_INSTALL_PREFIX`. (#2679, #2179, #2693) - Default to `ld.gold` linker for ThinLTO on Linux. (#2696) - Fix compilation issues on 64-bit macOS with DMD host compiler ≥ 2.079. (#2703, #2704) - druntime: Fix `core.stdc.stdint.(u)int64_t` on 64-bit macOS etc. (#2700) - Define `D_AVX` and `D_AVX2` if the target supports them. (#2711) - Fix sporadic front-end segfaults. (#2713) - Win64: Fix `extern(C++)` ABI wrt. passing small non-POD structs by value. (#2706) - Misc. druntime/Phobos fixes and upstream cherry-picks for ARM, AArch64, MIPS etc. - Fix potential LDC crashes when returning static array results from inline IR. (#2729) - Win64: Fix terminate handler for VC runtime DLL version 14.14.x.y. (#2739) # LDC 1.9.0 (2018-04-30) #### Big news - Frontend, druntime and Phobos are at version **2.079.1**, incl. new switches `-i[=]` (include imports in compilation) and `-Xi`. (#2587) - Support a **minimal (d)runtime**. (#2641) - Win32 breaking ABI change: add extra underscore for mangled names of D symbols. (#2598) - *No* breaking ABI change for 64-bit macOS wrt. C++ mangling of D `(u)long`. It's still mangled as C++ `(unsigned) long` in order not to break `size_t` and `ptrdiff_t` interop, whereas DMD 2.079 mangles it as `(unsigned) long long` (which, in combination with missing `core.stdc.config.cpp_(u)long`, makes it impossible to represent a C++ size_t/ptrdiff_t with DMD 2.079 on 64-bit macOS). - Support for **LLVM 6**. It's used for the prebuilt packages, except for the 32-bit Windows package (due to #2629). (#2608) - Integrated LLD (enable with `-link-internally`) now also able to **(cross-)link ELF and Mach-O binaries**, in addition to the existing Windows COFF support. (#2203) - Prebuilt Linux and macOS packages now ship with **LTO default libs** (druntime & Phobos). Keep on using `-flto=` to restrict LTO to your code, or opt for `-flto= -defaultlib=phobos2-ldc-lto,druntime-ldc-lto` to include the default libs. (#2640) - When linking against shared default libs, LDC now sets a default rpath (absolute path to the LDC lib dir(s); configurable in the `etc/ldc2.conf` file). (#2659) - New convenience mixin for fuzzing: `ldc.libfuzzer.DefineTestOneInput`. (#2510) #### Platform support - Supports LLVM 3.7 - 6.0. - Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017. #### Bug fixes - DMD-style inline asm: - Fix semantics of `extended ptr` for MSVC targets. (#2653) - Add missing EIP register. (#2654) - macOS: Fix install_name and symlinks of shared fat druntime/Phobos libs. (#2659, #2615) - Make `-static` override `-link-defaultlib-shared`. (#2646) - Make interface thunks forward variadic args. (#2613) - Fix `va_arg()` for PowerPC. (https://github.com/ldc-developers/druntime/pull/121) - MSVC: Support exporting naked functions. (#2648) - Only emit interface vtables in the declaring module. (#2647) - Call `_Unwind_Resume()` directly. (#2642) # LDC 1.8.0 (2018-03-04) #### Big news - Frontend, druntime and Phobos are at version **2.078.3**, incl. new switches `-dip1008` and `-transition=` as well as `pragma(crt_{con,de}structor)`. (#2486) - New switch `-link-defaultlib-shared` to link against shared druntime/Phobos. It defaults to true for shared libraries (`-shared`), so it's primarily useful for executables. (#2443) - Support for plugins via `-plugin=...` (see [this example](https://github.com/ldc-developers/ldc/tree/master/tests/plugins/addFuncEntryCall)). The mechanism is identical to Clang's LLVM-IR pass plugins and thus supports those as well, e.g., the [AFLfuzz LLVM-mode plugin](https://github.com/mirrorer/afl/blob/master/llvm_mode/afl-llvm-pass.so.cc), [Easy::Jit](https://github.com/jmmartinez/easy-just-in-time). (#2554) - Support for LLVM IR-based Profile-Guided Optimization via `-fprofile-{generate,use}` (not working on Windows yet). (#2474) - Basic support for [LLVM XRay instrumentation](https://llvm.org/docs/XRay.html) via `-fxray-{instrument,instruction-threshold}`. (#2465) - DMD-style function trace profiling via `-profile` (LDMD) / `-fdmd-trace-functions` (LDC). (#2477) - New UDA `ldc.attributes.assumeUsed` to prevent a symbol from being optimized away. (#2457) - The PGO helper library `ldc-profile-rt` was replaced by LLVM's vanilla profiling library. Our subset of [LLVM compiler-rt](https://compiler-rt.llvm.org/) libraries is now also shipped on Windows (excl. fuzzer). (#2527, #2544) - Cherry-picked upstream Musl C runtime support for Docker images based on Alpine and added a native Alpine/x64 compiler, which requires the `llvm5`, `musl-dev`, and `gcc` packages to run and link D apps and the `tzdata` and `libcurl` packages for certain stdlib modules. #### Platform support - Supports LLVM 3.7 - 5.0. - Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017. #### Bug fixes - Strict left-to-right evaluation/load order of function arguments. (#2450, #2502) - Inline asm silently ignores opcodes db, ds, di, dl, df, dd, de. (#2548) - Missed optimization for `scope` allocated classes. (#2515, #2516) - Don't eliminate frame pointer by default at `-O0`. (#2480, #2483) - LLVM complaining about invalid IR pointer arithmetics. (#2537) - `llvm_expect()` doesn't work with CTFE. (#2458, #2506) - `.{so,dylib}` file command line arguments should be forwarded to linker. (#2445, #2485) - macOS: Set shared stdlib install_name to `@rpath/`. (#2442, #2581) - `array ~= element` issue if rhs affects the lhs length. (#2588, #2589) - EH segfaults when checking D class catch handlers against thrown C++ exception. (#2590) # LDC 1.7.0 (2018-01-06) #### Big news - Frontend, druntime and Phobos are at version **2.077.1**. (#2401, #2430) - **C++ exceptions** can now be caught in D code, for Linux and MSVC targets (and possibly more). A logical step after consolidating LDC's exception handling for non-MSVC targets with DMD's DWARF implementation. (#2405) - Automated building of release and [CI packages](https://github.com/ldc-developers/ldc/releases/tag/CI). (#2438) #### Platform support - Supports LLVM 3.7 - 5.0. (binary packages on GitHub are built with LLVM 5.0.1) - Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017. #### Bug fixes - ICE on chained ref-returning opIndex op-assign. (#2415) - Windows: `export` visibility ignored for globals. (#2437) - Print error message when trying to use shared libraries with static runtime. (#2454) - ldc-1.7.0-beta1 regression: ICE with implicit cast. (#2471) - CMake: use llvm-config to determine LLVM's cmake directory, if possible. (#2482) # LDC 1.6.0 (2017-11-26) #### Big news - Frontend, druntime and Phobos are at version **2.076.1** (#2362), including `-betterC` semantics (#2365). - Experimental support for **dynamic codegen at runtime** (JIT-style) to tune performance-critical parts for the used CPU and/or treat special runtime variables as constants. See UDAs `@dynamicCompile`, `@dynamicCompileConst` in `ldc.attributes`; compile with command-line option `-enable-dynamic-compile` and use the `ldc.dynamic_compile` module to generate the code at runtime before invoking it. Congratulations to Ivan Butygin for implementing this non-trivial feature! (#2293) - Many `std.math` functions are now CTFE-able. (#2259) #### Platform support - Supports LLVM 3.7 - 5.0. - Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017. #### Bug fixes - Can't link against wsock32 and ws2_32 on Windows. (#468) - PGO incompatible with MSVC EH. (#1943) - Regression: ModuleInfos not emitted as COMDATs. (#2409) - Incorrect C assert function signature for Android. (#2417) - Overzealous error check when attempting to evaluate object as constant. (#2422) # LDC 1.5.0 (2017-10-29) #### Big news - Frontend, druntime and Phobos are at version **2.075.1**. (#2252) - New command-line option `-fp-contract` to control fused floating-point math, as well as about 25 new hidden options influencing codegen, see `-help-hidden` (`-enable-unsafe-fp-math`, `-debugger-tune` etc.). (#2148) - New command-line option `-linker`. Use `-linker=lld-link` to use an external LLD executable for MSVC targets (with experimental LTO support) or `-linker=` for other targets. (#2386) #### Breaking changes - Win32: the mangled names of D symbols now start with `_D`, not with `__D`, compatible with DMD. (#2353) #### Platform support - Supports LLVM 3.7 - 5.0. - Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017. #### Changes to the prebuilt packages - LLVM upgraded to [5.0.0](https://github.com/ldc-developers/llvm/releases/tag/ldc-v5.0.0-2). #### Bug fixes - Cyclic dependencies with `-cov`. (#2177) - ICE when capturing `this` in constructors. (#1728) - Objective-C bugs. (#2387, #2388) - LLVM/LLD 5.0: `-link-internally` broken. ([LLD patch](https://github.com/ldc-developers/llvm/releases/tag/ldc-v5.0.0-2)) - LLVM 5.0: need to build LDC with CMake option `-DLDC_WITH_LLD=OFF` to avoid conflicting command-line options. (#2148) - LLVM 5.0 & non-Windows targets: names of members in static libraries generated by LDC's internal archiver contain path information. (#2349) - ~~Workaround for Xcode 9 ranlib bug: don't use internal (LLVM) archiver by default for OSX targets. (#2350)~~ Xcode 9.0.1 fixes that bug, please upgrade. - Captured lazy parameters may be garbage. (#2302, #2330) - Packed struct layout regression (#2346) and `T.alignof` not respecting explicit type alignment via `align(N)`. (#2347) - OSX and Win32: mangling issue for druntime's `rt_options`. (#1970, #2354) - MinGW Win64: ABI regression wrt. functions returning x87 reals. (#2358) - Potential file permission problem when copying over LLVM libraries during LDC build. (#2337) - PPC64: Forward reference error with 1.3 release. (#2200) #### Known issues - LLVM 5.0: potentially failing LLVM assertion when emitting debuginfos and using inlining at the same time. (#2361) # LDC 1.4.0 (2017-09-11) #### Big news - Frontend, druntime and Phobos are at version **2.074.1**. (#2076) - **ldc-build-runtime**: a small D tool that makes it easy to compile the LDC runtime and standard library yourself, for example, to enable LTO-ability/sanitizers or cross-compiling executables and shared libraries for other platforms, like Android/ARM. ([Wiki page](https://wiki.dlang.org/Building_LDC_runtime_libraries)) - @joakim-noah's Android fixes have finally been fully incorporated, enabling every host to (cross-)compile to Android. (https://github.com/ldc-developers/llvm/commit/8655f3208cce28bb7f903cadf5f58a3911392bdc) [Instructions on using this ldc release to cross-compile D apps for Android are on the wiki](https://wiki.dlang.org/Build_D_for_Android), including how to try out the native Android/arm package, ie a D compiler that you can run _on_ your Android smartphone or tablet. - Improved support for [AddressSanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer). LDC will automatically link with the AddressSanitizer runtime library when `-fsanitize=address` is passed (when LDC can find the AddressSanitizer library). - [libFuzzer](https://llvm.org/docs/LibFuzzer.html) sanitizer support using `-fsanitize=fuzzer` (same as Clang). This flag implies `-fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp` and automatically links-in the runtime libFuzzer library if LDC can locate the runtime library. (With LLVM 4.0, there is a dependency on sanitizer runtime, so manually link the ASan library or use `-fsanitize=fuzzer,address`.) - New `-fsanitize-blacklist=` command-line option to exclude functions from sanitizer instrumentation (identical to Clang). The file must adhere to the textual [Sanitizer Special Case List format](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html). - New `-fsanitize-coverage=...` command-line option with the same [functionality as Clang](https://clang.llvm.org/docs/SanitizerCoverage.html). - The config file sections now feature an additional `post-switches` list for switches to be appended to the command line (the existing `switches` list is prepended). E.g., this now allows the user to override the directory containing the runtime libraries via `-L-L/my/runtime/libs` in the command line. (#2281) #### Breaking changes - The `-sanitize` command-line option has been renamed to `-fsanitize*`, for clang conformance. - The semantics of an empty `-conf=` command-line option have been changed from 'use default config file' to 'use no config file'. - The binary representations of the init values for `float/double/real` have been unified to a special quiet NaN, with both most significant mantissa bits set, on all hosts and for all targets. (#2207) #### Platform support - Supports LLVM 3.7 - 5.0. Support for 3.5 and 3.6 has been dropped. - Windows: Supports Visual Studio/C++ Build Tools 2015 and 2017, incl. the latest Visual Studio 2017 Update 15.3. #### Changes to the prebuilt packages - Consistent usage of a [minimally tailored](https://github.com/ldc-developers/llvm/releases/tag/ldc-v4.0.1) LLVM 4.0.1. - Newly enabled LLVM target `NVPTX` in order to target [CUDA via DCompute](http://forum.dlang.org/thread/smrnykcwpllukwtlfzxg@forum.dlang.org). - Linux x86_64: - Shipping with the LLVM **LTO plugin** for the `gold` linker. On Ubuntu 14.04 and later, `-flto=full|thin -Xcc=-fuse-ld=gold` should work out of the box. - Build environment upgraded from Ubuntu 12.04 and gcc 4.9 to Ubuntu 14.04 and gcc 6.3. - Windows/MSVC: Build environment upgraded from Visual Studio 2015 Update 3 to Visual Studio 2017 15.3.3 (WinSDK 10.0.15063). #### Bug fixes - Misc. debuginfo issues, incl. adaptations to internal LLVM 5.0 changes: (#2315) - `ref` parameters and closure parameters declared with wrong address and hence potentially showing garbage. - Win64: parameters > 64 bit passed by value showing garbage. - Win64: debuginfos for closure and nested variables now finally available starting with LLVM 5.0. - LLVM error `Global variable initializer type does not match global variable type!` for `T.init` with explicit initializers for dominated members in nested unions. (#2108) - Inconsistent handling of lvalue slicees wrt. visible side-effects of slice lower/upper bound expressions. (#1433) - Misc. dcompute issues. (#2195, #2215) - Potential LDC crashes due to dangling pointers after replacing IR globals (required in some cases if the type contains unions) almost fully mitigated. (#1829) - Multiple arrayop function emissions. (#2216) - Potentially incorrect memory layout for unnaturally aligned aggregates. (#2235) - Wrong `-m32/64` in command-line for external ARM assembler used via `-no-integrated-as`. #### Internals - Misc. CI improvements: - Addition of high-performant SemaphoreCI (incl. enabled LLVM/LDC assertions). - CircleCI upgraded to 2.0, testing with latest gcc. - Compile all D files for (non-unittest) druntime/Phobos at once. May be disabled via CMake option `COMPILE_ALL_D_FILES_AT_ONCE=OFF`. (#2231) #### Known issues - ThinLTO may not work well with the `ld.bfd` linker, use `ld.gold` instead (`-Xcc=-fuse-ld=gold`). - When building with LLVM 5.0, you may need `-DLDC_WITH_LLD=OFF` in the CMake command line. Otherwise, if the LLD headers are available and LDC is built with LLD integration, the produced LDC binary will refuse to work due to conflicting command-line options. # LDC 1.3.0 (2017-07-07) #### Big news - Frontend, druntime and Phobos are at version **2.073.2**. - A first experimental version of DCompute for **OpenCL/CUDA** targets has landed. See [announcement](http://forum.dlang.org/thread/zcfqujlgnultnqfksbjh@forum.dlang.org). - LLVM 3.9+: Experimental integration of **LLD**, the LLVM cross-linker, for MSVC targets. Check out these hassle-free [instructions](https://github.com/ldc-developers/ldc/pull/2142#issuecomment-304472412) to make LDC emit Windows executables and DLLs on any host! (#2142) - libconfig was replaced by an ad-hoc parser (in D), getting rid of the build and runtime dependency and shrinking the license file by roughly 50%. Thanks again, Remi! (#2016) - LDC now ships with static and shared runtime libs on supported platforms. (#1960) - LLVM 3.9+: Static libraries are now generated by LDC (LLVM) by default, not by system `ar` or `lib.exe`. This means that LDC can cross-compile and -archive static libs for all supported targets. Command-line option `-ar` allows specifying an external archiver to be used. (#2030) - New command-line options `-dip1000`, `-mv` and `-mscrtlib` (#2041). - Ships with dlang tools rdmd, ddemangle and dustmite. #### New features - LLVM 4.0+: Output LLVM optimization records via `-fsave-optimization-record`. (#2089) - New `-Xcc` command-line option for C compiler flags when linking via gcc/clang. Thanks Adrian! (#2104) - New function UDA `@ldc.attributes.llvmFastMathFlag("contract")` that specifically enables floating point operation fusing (fused multiply-add), previously only achievable with `@fastmath`. (#2060) #### Platform support - Supports LLVM 3.5 - 4.0. - Additional LLVM targets have been enabled for the prebuilt x86_64 packages: ARM, AArch64 and PowerPC. - Windows: Supports Visual Studio/Build Tools 2015 and **2017**. (#2065) - NetBSD: The 2.074 druntime patches have been cherry-picked. #### Bug fixes - LTO flags leaking into standard libraries when building LDC with LTO. (#2077) - Debug info fixes for class types - thanks Elie! (#2130) - OSX: Incomplete backtrace. (#2097) - Phobos on ARM: alignment and 64-bit `real` issues. (#2024) - Windows: EH-related crashes when linking against shared MS runtimes. (#2080) - ICE when initializing vector with `TVector.init`. (#2101) - Weird object file type autodetection. (#2105) - Typesafe variadics emitted as LLVM variadics. (#2121) - Superfluous masking of `bool` values. (#2131) - Output for `-mcpu=help` or `-mattr=help` printed multiple times. (#2073) - LDMD refuses some duplicate command-line options. (#2110) - Change format of predefined versions output for DMD compatibility. (#1962) - Fix potential segfault when formatting error msg (#2160) - Fix ICE when using `-main -cov` (#2164) - Make inlining threshold customizable via (existing) `-inline-threshold`, fix performance decrease with `-boundscheck=off` (#2161, #2180) - Switch Android onto the sectionELF style of module registry (#2172) - Check fiber migration on Android/ARM too (https://github.com/ldc-developers/druntime/pull/97) - Android moduleinfo section druntime fix (https://github.com/ldc-developers/druntime/pull/98) #### Building LDC - Building LDC requires a preinstalled D compiler. #### Internals - LDC now features D unittests itself. Just add some to LDC's D modules and they'll be compiled and executed by CI. (#2016) # LDC 1.2.0 (2017-04-21) #### Big news - Frontend, druntime and Phobos are at version **2.072.2**. #### New features - New function attribute `@ldc.attributes.allocSize` (#1610), see https://wiki.dlang.org/LDC-specific_language_changes#.40.28ldc.attributes.allocSize.29 #### Platform support - Supports LLVM 3.5 - 4.0. - Exception backtrace robustness has been significantly improved. - Emission of `reals` with differing precision to the host platform's `real` has been fixed.
(The compiler still uses the host platform's D real type to represent compile-time floating-point values, so parsing of literals and CTFE is restricted to the host real precision. For instance, LDC on AArch64 with its quad-precision reals would now make for a universal cross-compiler. On the other hand, cross-compiling from ARM to x86 with 80 bit reals still does not work – for example, `real.max` would silently overflow at compile-time and be emitted as 80-bit infinity.) #### Bug fixes - Compilation error with DMD 2.074 host compiler. - LLVM error when accessing `typeid(null)` (#2062). - Some LLVM intrinsics not available for LLVM ≥ 4.0 (#2037). - Spurious crashes on OS X user program shutdown when linking against static druntime lib. - Lexing floating-point literals may fail on PowerPC (#2046). - LDC crashes when trying to repaint static arrays (#2033). - No stack trace on Linux (#2004) and Windows (#1976, https://github.com/ldc-developers/druntime/pull/85). - Generated documentation file is immediately deleted when compiling at the same time. - LDMD doesn't append default file extension if `-of` option doesn't contain any (#2001, #2002). #### Building LDC - Building LDC requires a preinstalled D compiler. # LDC 1.1.1 (2017-02-23) #### Bug fixes - Linux: Always build C parts of standard library as PIC (#2009). This makes the binary packages usable on Ubuntu 16.10 (where executables are linked as position-independent code by default, in contrast to the older system used for preparing the packages). # LDC 1.1.0 (2017-01-26) #### Big news - Frontend, druntime and Phobos are at version **2.071.2**. - **[Link-Time Optimization (LTO)](https://johanengelen.github.io/ldc/2016/11/10/Link-Time-Optimization-LDC.html)** with `-flto={thin|full}` (LLVM ≥ 3.9). LTO requires linker support and is therefore currently only supported on Linux (`ld.gold` with LLVM plugin) and OS X. For more details, please refer to LLVM's and Clang's documentation, for example [Clang's ThinLTO documentation](http://clang.llvm.org/docs/ThinLTO.html). (#1840) - **Experimental cross-module inlining** (#1577, enable with `-enable-cross-module-inlining`) - **[Profile-guided optimization (PGO)](https://johanengelen.github.io/ldc/2016/07/15/Profile-Guided-Optimization-with-LDC.html)** (#1219) - Windows: enable C-style DLL exports/imports via `export` (functions only) (#1856) - Experimental IR-to-obj caching with `-cache=` (#1572, #1753, #1812, #1893) - Accept bitcode files on commandline (#1539) - `@ldc.attributes.fastmath` for [aggressive math optimization](https://johanengelen.github.io/ldc/2016/10/11/Math-performance-LDC.html) (#1472, #1438) - Binary distribution now bundles DUB (v1.2.0) (#1573) - **Breaking changes to command-line semantics** (see http://forum.dlang.org/post/ubobkfmsspbsmjunosna@forum.dlang.org). #### New features - New traits `__traits(targetCPU)` and `__traits(targetHasFeature, )` (#1434) - Drastic reduction of large symbol name lengths with optional `-hash-threshold` (#1445) - `@ldc.attributes.optStrategy(...)` for per-function optimization setting (#1637) - Extend intrinsic `llvm_memory_fence` for single-thread fences (#1837) - Add function instrumentation and profiling options via `-finstrument-functions` (#1845) - Add line-tables-only debuginfo via `-gline-tables-only` (#1861) - Implement DMD-compatible `-betterC` (#1872) #### Platform support - Supports LLVM 3.5 - 3.9 and current 4.0 release candidate. - ABI fixes, mainly for PowerPC targets. For bootstrapping, make sure to use source branch `ltsmaster` or the latest 0.17.x release, as all existing LDC releases ≥ 1.0 for PowerPC are unusable. (#1905) - Added ARM assembly code for Phobos `std.bigint`. (https://github.com/ldc-developers/phobos/pull/31) - Added some definitions for OpenBSD. (https://github.com/ldc-developers/druntime/commit/1ef83229673f5ae23f6a2a97f8e6b039647fbf87) - Updates for Solaris (https://github.com/ldc-developers/druntime/pull/71, https://github.com/ldc-developers/druntime/pull/72, https://github.com/ldc-developers/druntime/pull/73, https://github.com/ldc-developers/druntime/pull/74, https://github.com/ldc-developers/druntime/pull/75, https://github.com/ldc-developers/druntime/pull/79) - Linux: changed default to fully relocatable, position independent code (PIC). Change back to non-relocatable with `-relocation-model=static`. (#1664) #### Bug fixes - Potential crash when generating debuginfos for nested variables AND optimizing (#1933, #1963, #1984) - Alignment and size of critical sections, causing crashes on ARM (#1955, #1956) - `-finstrument-functions` using wrong return address (#1961) - Response files expanded too late, preventing cross-compilation on Windows when using dub (#1941, #1942) - Non-Windows x86_64 ABI bug wrt. returning static arrays (#1925, #1938) - Some array literals wrongly promoted to constants (#1924, #1927) - Misc. DUB regressions introduced by beta 3 (#1819) - Don't output static libs (with relative target filename) in `-od` objects directory (for LDC, but continue to do so for LDMD, for DMD compatibility). - LDMD: avoid object file collisions (due to multiple D source files with identical name in different dirs) when creating a static lib and remove the object files on success, mimicking DMD. - Create output directories recursively. - Potential ICE when building vibe.d projects (#1741) - ICE when calling an abstract function. (#1822) - ICE for invalid `__asm` constraints. (#802) - Wrong code for LLVM inline assembly returning a tuple (`__asmtuple`). (#1823) - Potential ICE wrt. captured variables. (#1864) - ARM: ICE when using LTO. (#1860) - Union layout and initialization, fixing the compilation of DMD (#1846, fixing most cases of #1829) - Allow custom file extension for .ll/.bc./.s output files. (#1843) - Windows: produced binaries with debuginfos are now large-address-aware too. (#442, #1876) - Fix debuginfos for parameters. (#1816) - Allow alignment of global variables < pointer size. (#1825) - Promote more immutable array literals to LLVM constants. (#506, #1821, #1838) - ICE when incrementing a complex variable. (#1806) - `llvm.va_start` not matched with `llvm.va_end` (#1744) - ldmd2 ignores -od option for libraries. (#1724) - ICE: toConstElem(CastExp) doesn't support NewExp as cast source. (#1723) - Mark runtime intrinsic shims as pragma(inline, true). (#1715) - pragma(inline, false) is incompatible with store/loadUnaligned. (#1711) - ICE: function not fully analyzed; previous unreported errors compiling std.variant.VariantN!(16LU, int, string).VariantN.__xopEquals? (#1698) - Segfault at at ldc/ldc-1.1.0/driver/main.cpp:1351. (#1696) - Make sure MSVC Build Tools are automatically detected by LDC. (#1690) - Update Windows README.txt. (#1689) - [ldc2-1.1.0-beta2] Missing symbol with inlining enabled. (#1678) - [REG ldc-1.1.0-beta2] ICE with templated classes. (#1677) - FreeBSD: Fix shared library build, working Hello World. (#1673) - Strange compile time error. (#1638) - LDC+DUB on Windows: folder separator is ignored. (#1621) - Fix evaluation order issues. (#1620, #1623) - Ubuntu 16.10 linker failures due to PIE by default (relocation R_X86_64_32S … can not be used). (#1618) - ICE on returning struct with zero-length static array. (#1611) - Debug info generation fixes for LLVM >= 3.8. (#1598) - ICE after return in the middle of a function on Win64/MSVC. (#1582) - Enums with referenced struct members result in floating point error. (#1581) - `pragma(inline, {true|false})` is no longer ignored (#1577) - Static array initialization with single element misdetected as direct construction via sret. (#1548) - ICE on static typeid. (#1540) - super doesn't work. (#1450) - Sub-expression evaluation order fixes. (#1327) - Add suffix to LTO linker plugin name to disambiguate with LLVM installation. (#1898) #### Building LDC - LDC now requires a preinstalled D compiler. (Versions `0.17.*` and the `ltsmaster` branch can be used to 'bootstrap' a build when only a C++ compiler is available.) - On Unix-like systems we now use gcc for linking. (#1594) #### Internals - optimizer: Skip adding verifier function pass if `-disable-verify` is given. (#1591) - DValue refactoring. (#1562) - Several improvements to generated IR. (#1528, #1630) - The vtable's of inherited interfaces are now put between the class's _monitor field and the user data fields. (https://issues.dlang.org/show_bug.cgi?id=15644) # LDC 1.0.0 (2016-06-03) #### Big news - Frontend, druntime and Phobos are at version **2.070.2**. #### Platform support - Support for LLVM 3.5 - 3.8 and preliminary support for LLVM 3.9. - Objective-C Support. (#1419) - ARM platform is now fully supported. (#1283, #489) - Better support for Android. (#1447) - Preliminary support for AArch64. #### Bug fixes - Outdated Copyright notice in LICENSE file. (#1322) - libconfig.so.8 not found (ubuntu 14.04) (#1460) - Wrong template filter on atomicOp. (#1454) - Runtime error on synchronized(typeid(SomeInterface)) { }. (#1377) - TypeInfo is stored read-only, but mutable from D. (#1337) - Inline assembly regression with local variable references. (#1292) - Compile error on Linux/PPC and Linux/PPC64 due to missing import in Phobos. #### Building LDC - LDC now requires a preinstalled D compiler. - Building on OS X requires ld64-264 or above (shipping with Xcode 7.3). This avoid spurious crashes during exception handling. XCode 7.3.1 should be used to avoid linker errors. (#1444, #1512) #### Internals - Linking against LLVM shared library is now supported. # LDC 0.17.6 (2018-08-24) #### News - Added support for **LLVM 6.0 and 7.0**. (https://github.com/ldc-developers/ldc/pull/2600, https://github.com/ldc-developers/ldc/pull/2825) - Backported **AArch64** fixes from master; most tests passing on Linux/glibc and Android. (https://github.com/ldc-developers/ldc/pull/2575, https://github.com/ldc-developers/ldc/pull/2811, https://github.com/ldc-developers/phobos/pull/49, https://github.com/ldc-developers/phobos/pull/50, https://github.com/ldc-developers/phobos/pull/51, https://github.com/ldc-developers/phobos/pull/52, https://github.com/ldc-developers/phobos/pull/53, https://github.com/ldc-developers/phobos/pull/54, https://github.com/ldc-developers/phobos/pull/55, https://github.com/ldc-developers/phobos/pull/56) - Fix generation of debug info. (https://github.com/ldc-developers/ldc/pull/2594) - Added support for bootstrapping on **DragonFly BSD**. (https://github.com/ldc-developers/ldc/pull/2580, https://github.com/ldc-developers/ldc/pull/2593, https://github.com/ldc-developers/ldc/pull/2689, https://github.com/ldc-developers/druntime/pull/110, https://github.com/ldc-developers/phobos/pull/45) - Fixed missing definition in `std.datetime` on Solaris. (https://github.com/ldc-developers/phobos/pull/46) - Fixed `std.datetime` unittest failure. (https://github.com/ldc-developers/phobos/pull/59) - Fixed tests for PowerPC. (https://github.com/ldc-developers/ldc/pull/2634, https://github.com/ldc-developers/ldc/pull/2635) - Improvements for **MIPS**. - Make `core.stdc.stdarg.va_*` functions `nothrow` to enable compiling the **2.082** frontend. (https://github.com/ldc-developers/ldc/pull/2821) - CI updates. # LDC 0.17.5 (2017-09-12) #### News - Added LLVM 5.0 support. - druntime: fixes for Android and addition of `core.math.yl2x[p1]()` for x86(_64) targets. - dmd-testsuite: backported `runnable/cppa.d` fix for GCC > 5. - CI updates. # LDC 0.17.4 (2017-03-23) #### News - Added LLVM 4.0 support. # LDC 0.17.3 (2017-02-01) #### Big news - Full stdlib and dmd testsuite passes on Android/ARM. #### Bug fixes - Fixes for PPC64-LE, MIPS64 and ARM/AArch64 ABIs (#1905) # LDC 0.17.2 (2016-10-09) #### Platform support - Support for LLVM 3.5 - 3.9. #### Bug fixes - Fixed soft float and hard float issues on ARM. - Fixed ABI error on Linux/PPC and Linux/PPC64. - Fixed error in `core.stdc.stdarg` on Linux/PPC and Linux/PPC64. - Fixed issue with `__tls_get_addr` on Linux/PPC and Linux/PPC64. # LDC 0.17.1 (2016-03-22) #### Big news - ARM platform is now a first class target for LDC. It passes most test cases (except 2 failures) and can successfully compile the D version of the compiler. #### Platform support - ARM platform is now fully supported. (#1283, #489) - Preliminary support for AArch64. - Preliminary support for LLVM 3.9. #### Bug fixes - Inline assembly regression with local variable references. (#1292) - Compile error on Linux/PPC and Linux/PPC64 due to missing import in Phobos. #### Building LDC - Linking against LLVM shared library is now supported. # LDC 0.17.0 (2016-02-13) #### Big news: - Frontend, druntime and Phobos are at version **2.068.2**. - The **exception handling** runtime now **no** longer allocates **GC** memory (although it still uses C `malloc` if there are more than 8 concurrent exceptions or nested `finally` blocks per thread). _Note:_ Creating the `Throwable`s in user code (e.g. `new Exception("…")`) and the `Runtime.traceHandler` may GC-allocate still. (Thanks for this goes to our newest contributor, @Philpax). - The `@ldc.attributes.section("…")` attribute can now be used to explicitly specify the object file section a variable or function is emitted to. - The `@ldc.attributes.target("…")` attribute can now be used to explicitly specify CPU features or architecture for a function. - The `-static` option can be used to create fully static binaries on Linux (akin to the GCC option of the same name). - `core.atomic.atomicOp()` now exploits LLVM read-modify-write intrinsics instead of using a compare-and-swap loop. As side-effect, the atomic intrinsics in module `ldc.intrinsics` have been renamed: - `llvm_atomic_cmp_swap` => `llvm_atomic_cmp_xchg` - `llvm_atomic_swap` => `llvm_atomic_rmw_xchg` - `llvm_atomic_load_*` => `llvm_atomic_rmw_*` #### Platform support: - Improved ARM support. (#1280) - The compiler now supports NetBSD. (#1247) (Thanks for this goes to @nrTQgc.) - The float ABI can now be derived from the second field of the triple. E.g. the hardfloat ABI is used if triple `armv7a-hardfloat-linux-gnueabi` is given. (#1253) - Support for fibers on AArch64. - Support for LLVM 3.8 and preliminary support for LLVM 3.9 #### Bug fixes: - make install problem. (#1289) - When a class contains a union, other fields are not statically initialized. (#1286) - Compiling DCD with -singleobj causes segmentation fault. (#1275) - 0.17.0-beta2: Cannot build DCD. (#1266) - Invalid bitcast error. (#1211) - 0.16.0-beta1: Trivial program fails on FreeBSD. (#1119) - Can't build gtk-d 3.1.4. (#1112) - x86 ABI: Fix Solaris regression and work around MSVC byval alignment issue. (#1230) - Atomic RMW operations emit subpar x86 assembly. (#1195) - align() not respected for local variable declarations. (#1154) - Codegen optimizations are no longer disabled when `-g` is given. (75b3270a) - Debug information is now generated for `ref` and `out` parameters. (#1177) - `core.internal.convert` tests do not depend on `real` padding bytes any longer. (#788) #### Building LDC: - LDC now requires LLVM 3.5–3.8 and thus also a C++11-capable compiler to build. #### Internals: - The LDC-specific parts of the source code have received a big overhaul to make use of some C++11 features and to unify the style (the LLVM style as per `clang-format` is now used). - The groundwork for a code generation test suite working on the LLVM IR level has been laid, together with some first test cases for alignment issues. - LDC now emits more optional LLVM IR attributes for more optimization opportunities. (#1232) #### Known issues: - LDC does not zero the padding area of a real variable. This may lead to wrong results if the padding area is also considered. See #770. Does not apply to real members inside structs etc. - Phobos does not compile on MinGW platform. ./ldc-1.41.0-src/.cirrus.yml0000644000175000017500000002421115077210635015605 0ustar matthiasmatthias# For PRs: check out the current *merge* ref, i.e., merge with target branch clone_steps_template: &CLONE_STEPS_TEMPLATE merge_with_target_branch_script: | if [ -n "${CIRRUS_PR:-}" ]; then git fetch origin "+refs/pull/$CIRRUS_PR/merge:" git checkout -f FETCH_HEAD fi # Installs lit, clones the git submodules, builds LDC and the test # runners and runs the tests. # Requires env variables CI_ARCH, CI_OS, EXTRA_CMAKE_FLAGS and PARALLELISM. common_steps_template: &COMMON_STEPS_TEMPLATE install_lit_script: | # Install lit rm -f /usr/lib/python3.13/EXTERNALLY-MANAGED # required for Ubuntu 25.04 python3 -m pip install --user lit python3 -c "import lit.main; lit.main.main();" --version . | head -n 1 clone_submodules_script: | cd $CIRRUS_WORKING_DIR git submodule update --init --depth $CIRRUS_CLONE_DEPTH build_script: | # Build LDC & LDC D unittests & defaultlib unittest runners cmake --version ninja --version cd $CIRRUS_WORKING_DIR/.. installDir=$PWD/install mkdir build cd build IFS=$'\n' extraFlags=( $(xargs -n1 <<<"$EXTRA_CMAKE_FLAGS") ) cmake -G Ninja $CIRRUS_WORKING_DIR \ -DCMAKE_BUILD_TYPE=Release \ -DD_COMPILER=$PWD/../host-ldc/bin/ldmd2 \ -DCMAKE_INSTALL_PREFIX=$installDir \ -DINCLUDE_INSTALL_DIR=$installDir/import \ -DLDC_LINK_MANUALLY=OFF \ "${extraFlags[@]}" ninja -j$PARALLELISM obj/ldc2.o all ldc2-unittest all-test-runners bin/ldc2 -version always: run_compiler_unittests_script: | cd $CIRRUS_WORKING_DIR/../build ctest --output-on-failure -R ldc2-unittest run_lit_testsuite_script: | cd $CIRRUS_WORKING_DIR/../build/tests python3 runlit.py -v -j $PARALLELISM . run_dmd_testsuite_script: | cd $CIRRUS_WORKING_DIR/../build DMD_TESTSUITE_MAKE_ARGS=-j$PARALLELISM ctest -V -R dmd-testsuite run_defaultlib_tests_script: | # Run defaultlib unittests & druntime integration tests cd $CIRRUS_WORKING_DIR/../build excludes="dmd-testsuite|lit-tests|ldc2-unittest" if [[ "$CI_OS" == "freebsd" ]]; then # FIXME: https://github.com/dlang/phobos/issues/10730 excludes+='|^std.experimental.allocator.building_blocks.allocator_list' fi ctest -j$PARALLELISM --output-on-failure -E "$excludes" --timeout 120 # Performs the extra packaging steps for jobs producing a prebuilt package. # Requires env variables CI_ARCH, CI_OS, GITHUB_TOKEN and PARALLELISM (and CC for FreeBSD). packaging_steps_template: &PACKAGING_STEPS_TEMPLATE # Install LDC & make portable install_script: | cd $CIRRUS_WORKING_DIR/.. cd build ninja install > /dev/null cd .. perl -pi -e s?$PWD/install/?%%ldcbinarypath%%/../?g install/etc/ldc2.conf if [[ "$CI_OS" == "freebsd" ]]; then perl -pi -e "s?,druntime-ldc\",?,druntime-ldc\", \"-gcc=$CC\",?" install/etc/ldc2.conf fi cp $CIRRUS_WORKING_DIR/{LICENSE,packaging/README} install cat install/etc/ldc2.conf # Now rename the installation dir to test portability mv install installed # Run hello-world integration test with shared libs run_shared_libs_integration_test_script: | cd $CIRRUS_WORKING_DIR/.. echo 'void main() { import std.stdio; writefln("Hello world, %d bits", size_t.sizeof * 8); }' > hello.d installed/bin/ldc2 hello.d -of=hello -link-defaultlib-shared ./hello # Run hello-world integration test with LTO run_lto_integration_test_script: | cd $CIRRUS_WORKING_DIR/.. installed/bin/ldc2 hello.d -of=hello_thin -flto=thin -defaultlib=phobos2-ldc-lto,druntime-ldc-lto ./hello_thin installed/bin/ldc2 hello.d -of=hello_full -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto ./hello_full # Run dynamic-compile integration test run_dynamic_compile_integration_test_script: | cd $CIRRUS_WORKING_DIR/.. installed/bin/ldc2 -enable-dynamic-compile -run $CIRRUS_WORKING_DIR/tests/dynamiccompile/array.d # Run ImportC integration test run_importC_integration_test_script: | cd $CIRRUS_WORKING_DIR/.. installed/bin/ldc2 -run $CIRRUS_WORKING_DIR/tests/dmd/runnable/test22597.c # Build & copy dub build_dub_script: | cd $CIRRUS_WORKING_DIR/.. export DMD=$PWD/installed/bin/ldmd2 git clone --recursive https://github.com/dlang/dub.git cd dub git checkout "$(cat $CIRRUS_WORKING_DIR/packaging/dub_version)" $DMD -run build.d -O -w -linkonce-templates cp bin/dub ../installed/bin ../installed/bin/dub --version # Build & copy dlang tools build_dlang_tools_script: | cd $CIRRUS_WORKING_DIR/.. DMD=$PWD/installed/bin/ldmd2 git clone --recursive https://github.com/dlang/tools.git dlang-tools cd dlang-tools git checkout "$(cat $CIRRUS_WORKING_DIR/packaging/dlang-tools_version)" mkdir bin $DMD -w -de -dip1000 rdmd.d -of=bin/rdmd $DMD -w -de -dip1000 ddemangle.d -of=bin/ddemangle $DMD -w -de -dip1000 DustMite/dustmite.d DustMite/splitter.d DustMite/polyhash.d -of=bin/dustmite cp bin/{rdmd,ddemangle,dustmite} ../installed/bin # Build & copy reggae build_reggae_script: | cd $CIRRUS_WORKING_DIR/.. git clone --recursive https://github.com/atilaneves/reggae.git cd reggae git checkout "$(cat $CIRRUS_WORKING_DIR/packaging/reggae_version)" # needs rdmd in PATH PATH="$PWD/../installed/bin:$PATH" DFLAGS="-O -linkonce-templates" ../dub/bin/dub build -v --build-mode=allAtOnce --combined --compiler="$PWD/../installed/bin/ldc2" cp bin/reggae ../installed/bin ../installed/bin/reggae --version -b ninja # Pack artifact pack_artifact_script: | cd $CIRRUS_WORKING_DIR/.. mkdir artifacts if [[ "${CIRRUS_TAG:-}" == v* ]]; then artifactID=${CIRRUS_TAG:1} else artifactID=${CIRRUS_CHANGE_IN_REPO:0:8} fi artifactName=ldc2-$artifactID-$CI_OS-$CI_ARCH mv installed $artifactName chmod -R go=rX $artifactName tar=tar if [[ "$CI_OS" == "freebsd" ]]; then tar=gtar fi $tar -cf - --owner=0 --group=0 $artifactName | 7z a artifacts/$artifactName.tar.xz -si -txz -mx9 -mmt$PARALLELISM ls -lh artifacts/ldc2-*.tar.xz # Upload to GitHub release (only for commits on the master branch and tags) upload_to_github_script: | cd $CIRRUS_WORKING_DIR if [[ "${CIRRUS_TAG:-}" == v* ]]; then tools/upload-to-github.sh $CIRRUS_TAG ../artifacts/ldc2-*.tar.xz elif [[ "${CIRRUS_TAG:-}" = "" && "$CIRRUS_PR" = "" && "$CIRRUS_BRANCH" = "master" ]]; then tools/upload-to-github.sh CI ../artifacts/ldc2-*.tar.xz fi # Installs Ubuntu 20.04+ prerequisites. # Requires env variables CI_ARCH, EXTRA_APT_PACKAGES and EXTRA_CMAKE_FLAGS. install_ubuntu_prerequisites_template: &INSTALL_UBUNTU_PREREQUISITES_TEMPLATE install_prerequisites_script: | cd $CIRRUS_WORKING_DIR/.. nproc export DEBIAN_FRONTEND=noninteractive if [[ "$EXTRA_CMAKE_FLAGS" = *-DMULTILIB?ON* ]]; then dpkg --add-architecture i386 gcc_pkg="g++-multilib" libcurl_pkg="libcurl4 libcurl4:i386" else gcc_pkg="g++" libcurl_pkg="libcurl4" fi apt-get -q update apt-get -yq install \ git-core cmake ninja-build $gcc_pkg \ zlib1g-dev $libcurl_pkg curl gdb python3 python3-pip tzdata unzip zip \ $EXTRA_APT_PACKAGES python3 --version # Install custom Ninja on x86_64 if [[ "$CI_ARCH" == "x86_64" ]]; then curl -fL --retry 3 --max-time 60 -O https://github.com/symmetryinvestments/ninja/releases/download/v1.11.1-sym1/ninja-linux.zip mkdir ninja unzip ninja-linux.zip -d ninja rm ninja-linux.zip ln -sf $PWD/ninja/ninja /usr/bin/ninja fi environment: CIRRUS_CLONE_DEPTH: 50 GITHUB_TOKEN: ENCRYPTED[0955bd48c8d4e5391446fc0149d0719ad0b63df27ec9e6c180a5730a5b10dc7f28f09d1383423db158d21380ee2b022a] task: name: Ubuntu rolling x64 shared-libs-only gdmd container: image: ubuntu:rolling cpu: 8 memory: 16G timeout_in: 15m environment: CI_ARCH: x86_64 CI_OS: linux EXTRA_APT_PACKAGES: "gdmd llvm-dev libclang-common-20-dev lld libcurl4-openssl-dev" # need `-DCMAKE_EXE_LINKER_FLAGS=-lcurl` to work around libcurl dependency for ldc-profdata (distro LLVM apparently built with non-default LLVM_ENABLE_CURL=ON) EXTRA_CMAKE_FLAGS: >- -DBUILD_SHARED_LIBS=ON -DBUILD_LTO_LIBS=ON -DD_COMPILER=gdmd -DLDC_LINK_MANUALLY=ON -DCMAKE_EXE_LINKER_FLAGS=-lcurl PARALLELISM: 8 # for gdmd: LANG: C.UTF-8 << : *INSTALL_UBUNTU_PREREQUISITES_TEMPLATE << : *CLONE_STEPS_TEMPLATE # to get the LTO lit-tests working: make_lld_the_default_linker_script: | ln -sf ld.lld /usr/bin/ld ld --version disable_tests_script: | cd $CIRRUS_WORKING_DIR # FIXME: lsan_interceptors.cpp:82 "((!lsan_init_is_running)) != (0)" rm tests/sanitizers/lsan_memleak.d # apparently just fails due to extra linker error output rm tests/dmd/fail_compilation/needspkgmod.d << : *COMMON_STEPS_TEMPLATE task: name: FreeBSD 13.4 x64 freebsd_instance: image_family: freebsd-13-4 cpu: 4 memory: 8G timeout_in: 60m environment: CI_ARCH: x86_64 CI_OS: freebsd EXTRA_CMAKE_FLAGS: >- -DBUILD_LTO_LIBS=ON -DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto" -DEXTRA_CXXFLAGS=-flto=full PARALLELISM: 4 CC: clang19 CXX: clang++19 install_prerequisites_script: | cd $CIRRUS_WORKING_DIR/.. sysctl -n hw.ncpu pkg install -y git cmake ninja gmake llvm19 bash gtar 7-zip ldc python3 --version python3 -m ensurepip # set up default llvm-config ls -l /usr/local/bin/llvm-config* ln -sf llvm-config19 /usr/local/bin/llvm-config << : *CLONE_STEPS_TEMPLATE clone_submodules_early_script: | cd $CIRRUS_WORKING_DIR git submodule update --init --depth $CIRRUS_CLONE_DEPTH # Build a first LDC as host compiler for the actual build build_bootstrap_ldc_script: | cd $CIRRUS_WORKING_DIR/.. mkdir host-ldc cd host-ldc cmake -G Ninja $CIRRUS_WORKING_DIR \ -DCMAKE_BUILD_TYPE=Release \ -DD_COMPILER=ldmd2 \ -DBUILD_SHARED_LIBS=OFF \ -DLDC_DYNAMIC_COMPILE=OFF \ -DBUILD_LTO_LIBS=ON ninja -j$PARALLELISM bin/ldc2 -version << : *COMMON_STEPS_TEMPLATE << : *PACKAGING_STEPS_TEMPLATE ./ldc-1.41.0-src/README.md0000644000175000017500000001252615077210635014762 0ustar matthiasmatthiasLDC – the LLVM-based D Compiler =============================== [![Latest release](https://img.shields.io/github/v/release/ldc-developers/ldc?include_prereleases&label=latest)][8] [![Latest stable release](https://img.shields.io/github/v/release/ldc-developers/ldc?label=stable)][0] [![Build status](https://img.shields.io/circleci/project/github/ldc-developers/ldc/master?logo=CircleCI&label=CircleCI)][3] [![Build status](https://img.shields.io/cirrus/github/ldc-developers/ldc/master?label=Cirrus%20CI&logo=Cirrus%20CI)][4] [![Build status](https://img.shields.io/github/actions/workflow/status/ldc-developers/ldc/main.yml?branch=master&label=GitHub%20Actions%20%28main%29&logo=github)][7] [![Build status](https://img.shields.io/github/actions/workflow/status/ldc-developers/ldc/supported_llvm_versions.yml?branch=master&label=GitHub%20Actions%20%28LLVM%29&logo=github)][7] The LDC project provides a portable D programming language compiler with modern optimization and code generation capabilities. The compiler uses the official DMD frontend to support the latest version of D2, and relies on the LLVM Core libraries for code generation. LDC is fully Open Source; the parts of the source code not taken/adapted from other projects are BSD-licensed (see the LICENSE file for details). Please consult the D wiki for further information: https://wiki.dlang.org/LDC D1 is no longer available; see the `d1` Git branch for the last version supporting it. Installation ------------ ### From a pre-built package Portable stand-alone binary builds (and a Windows installer) for common platforms (incl. Linux, macOS, Windows, FreeBSD and Android) are available at the [GitHub release page](https://github.com/ldc-developers/ldc/releases). For Windows, the [Visual D installer](https://rainers.github.io/visuald/visuald/StartPage.html) also comes with a bundled LDC. For bleeding-edge users, we also provide the [latest successful Continuous Integration builds](https://github.com/ldc-developers/ldc/releases/tag/CI) with enabled LLVM & LDC assertions (increasing compile times by roughly 50%). The [dlang.org install script](https://dlang.org/install.html) can also be used to install these official packages from GitHub: curl -fsS https://dlang.org/install.sh | bash -s ldc In addition, LDC is available from various package managers (but note that these packages are **community-maintained, might be outdated and not offer the full feature set of official packages from GitHub**): | | Command | | ------------ | -------------------------------------------- | | Alpine Linux | `apk add ldc` | | Android | in [Termux app](https://play.google.com/store/apps/details?id=com.termux&hl=en): `pkg install ldc` | | Arch Linux | `pacman -S ldc` | | Chocolatey | `choco install ldc` | | Debian | `apt install ldc` | | Docker | `docker pull dlang2/ldc-ubuntu` | | Fedora | `dnf install ldc` | | FreeBSD | `pkg install ldc` | | Gentoo | `layman -a ldc` | | Homebrew | `brew install ldc` | | Nix/NixOS | `nix-env -i ldc` | | OpenBSD | `pkg_add ldc` | | Snap | `snap install --classic --channel=edge ldc2` | | Ubuntu | `apt install ldc` | | Void | `xbps-install -S ldc` | ### Building from source In-depth material on building and installing LDC and the standard libraries is available on the project wiki for [Linux, macOS, BSD, and Android](http://wiki.dlang.org/Building_LDC_from_source) and [Windows](http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC). If you have a working C++/D build environment, CMake, and a recent LLVM version (≥ 15) available, there should be no big surprises. Do not forget to make sure the Phobos submodule is up to date: $ cd ldc $ git submodule update --init (DMD, GDC and LDC are supported as host compilers. For bootstrapping purposes, we recommend GDC via its `gdmd` wrapper.) Cross-compilation ----------------- Similar to other LLVM-based compilers, cross-compiling with LDC is simple. Full instructions and example invocations are provided on the dedicated [Wiki page](https://wiki.dlang.org/Cross-compiling_with_LDC). #### Targeting Android You can find full instructions on cross-compiling or natively compiling for Android [on the wiki](https://wiki.dlang.org/Build_D_for_Android). Contact ------- The best way to get in touch with the developers is either via the [digitalmars.D.ldc forum/newsgroup/mailing list](https://forum.dlang.org) or our [Gitter chat](http://gitter.im/ldc-developers/main). There is also the #ldc IRC channel on FreeNode. For further documentation, contributor information, etc. please see [the D wiki](https://wiki.dlang.org/LDC). Feedback of any kind is very much appreciated! [0]: https://github.com/ldc-developers/ldc/releases/latest [3]: https://circleci.com/gh/ldc-developers/ldc/tree/master [4]: https://cirrus-ci.com/github/ldc-developers/ldc/master [7]: https://github.com/ldc-developers/ldc/actions?query=branch%3Amaster [8]: https://github.com/ldc-developers/ldc/releases ./ldc-1.41.0-src/ldc2_install.conf.in0000644000175000017500000000266715077210635017336 0ustar matthiasmatthias// See comments in driver/config.d in ldc source tree for grammar description of // this config file. // For cross-compilation, you can add sections for specific target triples by // naming the sections as (quoted) regex patterns. See LDC's `-v` output // (`config` line) to figure out your normalized triple, depending on the used // `-mtriple`, `-m32` etc. E.g.: // // "^arm.*-linux-gnueabihf$": { … }; // "86(_64)?-.*-linux": { … }; // "i[3-6]86-.*-windows-msvc": { … }; // // Later sections take precedence and override settings from previous matching // sections while inheriting unspecified settings from previous sections. // A `default` section always matches (treated as ".*") and is therefore usually // the first section. default: { // default switches injected before all explicit command-line switches switches = [ "-defaultlib=phobos2-ldc,druntime-ldc",@ADDITIONAL_DEFAULT_LDC_SWITCHES@ ]; // default switches appended after all explicit command-line switches post-switches = [ "-I@INCLUDE_INSTALL_DIR@", ]; // default directories to be searched for libraries when linking lib-dirs = [ "@CMAKE_INSTALL_LIBDIR@",@OPTIONAL_COMPILER_RT_DIR@ ]; // default rpath when linking against the shared default libs rpath = "@SHARED_LIBS_INSTALL_RPATH@"; }; "^wasm(32|64)-": { switches = [ "-defaultlib=",@WASM_DEFAULT_LDC_SWITCHES@ ]; lib-dirs = []; }; ./ldc-1.41.0-src/LICENSE0000644000175000017500000011640115077210634014504 0ustar matthiasmatthiasOverview ======== LDC is released under the "three-clause BSD" LDC license reproduced below, with the following exceptions: Compiler (bin/ in binary packages): - LDC uses the DMD frontend (ddmd/* in source code distributions), which was originally written by Walter Bright and is released under the Boost Software License - Version 1.0. LDMD (driver/ldmd.cpp) and the RTTI handling code (gen/typinf.cpp) are also partly derived from DMD. - LDC incorporates code (gen/asmstmt.cpp and gen/asm-*.h) originally written by David Friedman for GDC and released under the Artistic license or the GPL version 2 or later. - The LDC project makes use of the LLVM framework, which is governed by the Apache License v2.0 with LLVM exceptions (for LLVM 9+) or the University of Illinois Open Source License (LLVM 8 and earlier). A few LDC source files directly incorporate code derived from LLVM, see the file headers for details. Libraries (lib/ and import/ in binary packages): - The D standard library, comprised of druntime (runtime/druntime) and Phobos (runtime/phobos), is distributed under the terms of the Boost Software License. See the individual source files for author information. - Most of the ldc-jit-rt library is licensed under the terms of the Boost Software license. Additionally it contains code derived from LLVM governed by the University of Illinois Open Source License. Finally, it incorporates code from the LDC compiler (gen/passes/* and parts of gen/optimizer.cpp) which are under "three-clause BSD" LDC license. These parts from the LDC compiler can be omitted if you build ldc-jit-rt with LDC_DYNAMIC_COMPILE_USE_CUSTOM_PASSES=OFF. - The profile-rt runtime library (runtime/profile-rt) is a copy of LLVM's compiler-rt/profile library with a small D source addition. It is dual licensed under the University of Illinois Open Source License and under the MIT License, which does not contain the binary redistribution clause. The absense of the binary redistribution clause means that programs into which profile-rt has been linked are not subject to the binary redistribution clause. (currently, profile-rt is only linked implicitly with and only used implicitly by programs built with instrumentation through `-fprofile-instr-generate`). Full license texts ================== -- LDC license ----------------------------------------------------------------- Copyright (c) 2007-2017 LDC Team. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the LDC Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- DMD license ----------------------------------------------------------------- Copyright (c) 1999-2017 by Digital Mars written by Walter Bright. DMD is released under the terms of the Boost Software License - Version 1.0. -- Runtime library license (druntime and Phobos) ------------------------------ Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- LLVM license ---------------------------------------------------------------- ============================================================================== The LLVM Project is under the Apache License v2.0 with LLVM Exceptions: ============================================================================== Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ---- LLVM Exceptions to the Apache 2.0 License ---- As an exception, if, as a result of your compiling your source code, portions of this Software are embedded into an Object form of such source code, you may redistribute such embedded portions in such Object form without complying with the conditions of Sections 4(a), 4(b) and 4(d) of the License. In addition, if you combine or link compiled forms of this Software with software that is licensed under the GPLv2 ("Combined Software") and if a court of competent jurisdiction determines that the patent provision (Section 3), the indemnity provision (Section 9) or other Section of the License conflicts with the conditions of the GPLv2, you may retroactively and prospectively choose to deem waived or otherwise exclude such Section(s) of the License, but only in their entirety and only with respect to the Combined Software. ============================================================================== Software from third parties included in the LLVM Project: ============================================================================== The LLVM Project contains third party software which is under different license terms. All such code will be identified clearly using at least one of two mechanisms: 1) It will be in a separate directory tree with its own `LICENSE.txt` or `LICENSE` file at the top containing the specific license and restrictions which apply to that software, or 2) It will contain specific license and restriction terms at the top of every file. ============================================================================== Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy): ============================================================================== University of Illinois/NCSA Open Source License Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign. All rights reserved. Developed by: LLVM Team University of Illinois at Urbana-Champaign http://llvm.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. * Neither the names of the LLVM Team, University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. -- MIT license - (profile-rt) ------------------------------------------------- Copyright (c) 2009-2016 by the compiler-rt contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- License of GDC artefacts --------------------------------------------------- The "Artistic License" Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 6. The source code and object code supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. 7. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End --- GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! ./ldc-1.41.0-src/ldc2.conf.in0000644000175000017500000000276015077210634015601 0ustar matthiasmatthias// See comments in driver/config.d in ldc source tree for grammar description of // this config file. // For cross-compilation, you can add sections for specific target triples by // naming the sections as (quoted) regex patterns. See LDC's `-v` output // (`config` line) to figure out your normalized triple, depending on the used // `-mtriple`, `-m32` etc. E.g.: // // "^arm.*-linux-gnueabihf$": { … }; // "86(_64)?-.*-linux": { … }; // "i[3-6]86-.*-windows-msvc": { … }; // // Later sections take precedence and override settings from previous matching // sections while inheriting unspecified settings from previous sections. // A `default` section always matches (treated as ".*") and is therefore usually // the first section. default: { // default switches injected before all explicit command-line switches switches = [ "-defaultlib=druntime-ldc",@ADDITIONAL_DEFAULT_LDC_SWITCHES@ ]; // default switches appended after all explicit command-line switches post-switches = [ "-I@RUNTIME_DIR@/src", "-I@LDC_GCCBUILTINS_IMPORT_DIR@", "-I@JITRT_DIR@/d", ]; // default directories to be searched for libraries when linking lib-dirs = [ "@CMAKE_BINARY_DIR@/lib@LIB_SUFFIX@",@OPTIONAL_COMPILER_RT_DIR@ ]; // default rpath when linking against the shared default libs rpath = "@SHARED_LIBS_RPATH@"; }; "^wasm(32|64)-": { switches = [ "-defaultlib=",@WASM_DEFAULT_LDC_SWITCHES@ ]; lib-dirs = []; }; ./ldc-1.41.0-src/.editorconfig0000644000175000017500000000105015077210634016145 0ustar matthiasmatthias# EditorConfig file: http://editorconfig.org/ root = true # Default settings for all file types: # + save files in UTF-8 encoding # + remove whitespace at the end of lines [*] charset = utf-8 insert_final_newline = true trim_trailing_whitespace = true # File type specific settings: [*.{asm,S,c,m,d,di,dd,ddoc,dt,json,sdl,R,bat,bash,fish,sh,zsh}] indent_style = space indent_size = 4 # Make and Windows module-definition files use tabs for indentation [*.{mak,Makefile,def}] indent_style = tab [*.{cpp,h,yml}] indent_style = space indent_size = 2 ./ldc-1.41.0-src/Doxyfile0000644000175000017500000031342515077210634015212 0ustar matthiasmatthias# Doxyfile 1.8.9.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = LDC # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = 1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = doxy # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = YES # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. # logger.cpp contains tabs and they are matching an indentation of 4 spaces. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed # or free formatted code, this is the default for Fortran type files), VHDL. For # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = c=C++ h=C++ # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. # Note: If this tag is empty the current directory is searched. INPUT = driver \ dmd2 \ dmd2/root \ gen \ gen/passes \ ir # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank the # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, # *.qsf, *.as and *.js. FILE_PATTERNS = *.c \ *.cpp \ *.h \ *.md # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = README.md #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = YES # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was # compiled with the --with-libclang option. # The default value is: NO. CLANG_ASSISTED_PARSING = NO # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that # the include paths will already be set by doxygen for the files and directories # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_OPTIONS = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to NO can help when comparing the output of multiple runs. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NONE # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /