Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade frontend & libs to v2.093.0+ #3476

Merged
merged 15 commits into from
Jul 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ include(GetLinuxDistribution)
#

# Version information
set(LDC_VERSION "1.22.0") # May be overridden by git hash tag
set(LDC_VERSION "1.23.0") # May be overridden by git hash tag
set(DMDFE_MAJOR_VERSION 2)
set(DMDFE_MINOR_VERSION 0)
set(DMDFE_PATCH_VERSION 92)
set(DMDFE_FIX_LEVEL 1)
set(DMDFE_PATCH_VERSION 93)
set(DMDFE_FIX_LEVEL 0)

set(DMD_VERSION ${DMDFE_MAJOR_VERSION}.${DMDFE_MINOR_VERSION}${DMDFE_PATCH_VERSION})
if(DEFINED DMDFE_FIX_LEVEL)
Expand Down Expand Up @@ -216,7 +216,7 @@ if(MSVC)
endforeach()
endif()

append("-J${PROJECT_SOURCE_DIR}/res" DDMD_DFLAGS) # Needed for importing text files
append("-J${PROJECT_SOURCE_DIR}/dmd/res" DDMD_DFLAGS) # Needed for importing text files
string(STRIP "${DDMD_DFLAGS}" DDMD_DFLAGS)

# Use separate compiler flags for the frontend and for the LDC-specific parts,
Expand Down Expand Up @@ -363,7 +363,7 @@ configure_file(driver/ldc-version.cpp.in driver/ldc-version.cpp)
# 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 res/*.*)
file(GLOB_RECURSE FE_RES dmd/res/*.*)
file(GLOB_RECURSE GEN_SRC gen/*.cpp)
file(GLOB_RECURSE GEN_HDR gen/*.h)
file(GLOB_RECURSE GEN_SRC_D gen/*.d)
Expand Down
5 changes: 5 additions & 0 deletions cmake/Modules/BuildDExecutable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ endmacro()

# Depends on these global variables:
# - D_COMPILER
# - D_COMPILER_ID
# - D_COMPILER_FLAGS
# - DDMD_DFLAGS
# - DDMD_LFLAGS
Expand All @@ -30,6 +31,10 @@ function(build_d_executable target_name output_exe d_src_files compiler_args lin
if(NOT compile_separately)
# Compile all D modules to a single object.
set(object_file ${PROJECT_BINARY_DIR}/obj/${target_name}${CMAKE_CXX_OUTPUT_EXTENSION})
# Default to -linkonce-templates with LDMD host compiler, to speed-up optimization.
if("${D_COMPILER_ID}" STREQUAL "LDMD")
set(dflags -linkonce-templates ${dflags})
endif()
add_custom_command(
OUTPUT ${object_file}
COMMAND ${D_COMPILER} -c ${dflags} -of${object_file} ${compiler_args} ${d_src_files}
Expand Down
2 changes: 1 addition & 1 deletion cmake/VisualD.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ClCompile>
<DCompile>
<ImportPaths>$(MSBuildThisFileDirectory)..</ImportPaths>
<StringImportPaths>$(MSBuildThisFileDirectory)..\res</StringImportPaths>
<StringImportPaths>$(MSBuildThisFileDirectory)..\dmd\res</StringImportPaths>
<VersionIdentifiers>IN_LLVM</VersionIdentifiers>
</DCompile>
</ItemDefinitionGroup>
Expand Down
19 changes: 15 additions & 4 deletions dmd/attrib.d
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,20 @@ extern (C++) final class ProtDeclaration : AttribDeclaration
if (protection.kind == Prot.Kind.package_ && protection.pkg && sc._module)
{
Module m = sc._module;
Package pkg = m.parent ? m.parent.isPackage() : null;
if (!pkg || !protection.pkg.isAncestorPackageOf(pkg))
error("does not bind to one of ancestor packages of module `%s`", m.toPrettyChars(true));

// While isAncestorPackageOf does an equality check, the fix for issue 17441 adds a check to see if
// each package's .isModule() properites are equal.
//
// Properties generated from `package(foo)` i.e. protection.pkg have .isModule() == null.
// This breaks package declarations of the package in question if they are declared in
// the same package.d file, which _do_ have a module associated with them, and hence a non-null
// isModule()
if (!m.isPackage() || !protection.pkg.ident.equals(m.isPackage().ident))
{
Package pkg = m.parent ? m.parent.isPackage() : null;
if (!pkg || !protection.pkg.isAncestorPackageOf(pkg))
error("does not bind to one of ancestor packages of module `%s`", m.toPrettyChars(true));
}
}
return AttribDeclaration.addMember(sc, sds);
}
Expand Down Expand Up @@ -833,7 +844,7 @@ extern (C++) final class PragmaDeclaration : AttribDeclaration
inlining = PINLINE.default_;
else if (args.dim != 1)
{
error("one boolean expression expected for `pragma(inline)`, not %d", args.dim);
error("one boolean expression expected for `pragma(inline)`, not %llu", cast(ulong) args.dim);
args.setDim(1);
(*args)[0] = new ErrorExp();
}
Expand Down
Loading