Skip to content

Commit 2c56fcc

Browse files
committed
Merge remote-tracking branch 'origin/master' into merge-2.112
2 parents 22d84cf + 46bbe8b commit 2c56fcc

29 files changed

+183
-86
lines changed

.github/actions/1-setup/action.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ runs:
119119
sudo ln -sf ld.lld /usr/bin/ld
120120
ld --version
121121
122-
- name: Install ninja v1.12.1
123-
uses: Ahajha/gha-setup-ninja@69595b0cf872acdad8ce599142fbdc88724b9a2b
124-
125122
- name: Install D host compiler
126123
uses: dlang-community/setup-dlang@v1
127124
with:

.github/actions/merge-windows/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ runs:
6868
ldc2-multilib\bin\ldc2 -link-defaultlib-shared -m32 -run hello.d || exit /b
6969
7070
# preliminary arm64 cross-compilation support
71-
- name: Install ninja v1.12.1
72-
uses: Ahajha/gha-setup-ninja@69595b0cf872acdad8ce599142fbdc88724b9a2b
7371
- name: Set VSDIR env variable
7472
shell: bash
7573
run: echo "VSDIR=$(vswhere -latest -property installationPath)" >> $GITHUB_ENV

.github/workflows/main.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
with_pgo: true
8383

8484
- job_name: macOS arm64
85-
os: macos-14
85+
os: macos-15
8686
arch: arm64
8787
extra_cmake_flags: >-
8888
-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm@20/bin/clang
@@ -159,9 +159,6 @@ jobs:
159159
uses: ./.github/actions/helper-build-gdb
160160
with:
161161
arch: ${{ matrix.arch }}
162-
- name: 'macOS arm64: Switch to Xcode 16'
163-
if: runner.os == 'macOS' && matrix.arch == 'arm64'
164-
run: sudo xcode-select -switch /Applications/Xcode_16.1.app
165162
- name: Build bootstrap LDC
166163
uses: ./.github/actions/2-build-bootstrap
167164
with:

.github/workflows/supported_llvm_versions.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ jobs:
5454
with:
5555
submodules: true
5656
fetch-depth: 50
57-
- name: Install ninja
58-
uses: symmetryinvestments/gha-setup-ninja@v2
5957
- name: Install D host compiler
6058
uses: dlang-community/setup-dlang@v1
6159
with:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# LDC master
22

33
#### Big news
4+
- **Breaking change for dcompute**: The special `@kernel` UDA is now a function and _**requires**_ parentheses as in `@kernel() void foo(){}`. Optionally you can provide launch dimensions, `@kernel([2,4,8])`, to specify to the compute runtime how the kernel is intended to be launched.
45

56
#### Platform support
67

driver/codegenerator.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,11 @@ void CodeGenerator::prepareLLModule(Module *m) {
216216
// name, as it should not collide with a symbol name used somewhere in the
217217
// module.
218218
ir_ = new IRState(m->srcfile.toChars(), context_);
219+
#if LDC_LLVM_VER >= 2100
220+
ir_->module.setTargetTriple(*global.params.targetTriple);
221+
#else
219222
ir_->module.setTargetTriple(global.params.targetTriple->str());
223+
#endif
220224
ir_->module.setDataLayout(*gDataLayout);
221225

222226
// TODO: Make ldc::DIBuilder per-Module to be able to emit several CUs for

driver/cpreprocessor.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ FileName runCPreprocessor(FileName csrcfile, Loc loc, OutBuffer &defines) {
124124
args.push_back("/Zc:preprocessor"); // use the new conforming preprocessor
125125
} else {
126126
// propagate the target to the preprocessor
127-
args.push_back("-target");
128-
args.push_back(triple.getTriple());
127+
args.push_back("--target=" + triple.getTriple());
129128

130129
#if LDC_LLVM_VER >= 1800 // getAllProcessorFeatures was introduced in this version
131130
// propagate all enabled/disabled features to the preprocessor
@@ -146,8 +145,7 @@ FileName runCPreprocessor(FileName csrcfile, Loc loc, OutBuffer &defines) {
146145

147146
// print macro definitions (clang-cl doesn't support /PD - use clang's
148147
// -dD)
149-
args.push_back("-Xclang");
150-
args.push_back("-dD");
148+
args.push_back("/clang:-dD");
151149

152150
// need to redefine some macros in importc.h
153151
args.push_back("-Wno-builtin-macro-redefined");

driver/targetmachine.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,13 @@ createTargetMachine(const std::string targetTriple, const std::string arch,
652652
finalFeaturesString.c_str());
653653
}
654654

655-
return target->createTargetMachine(triple.str(), cpu, finalFeaturesString,
655+
return target->createTargetMachine(
656+
#if LDC_LLVM_VER >= 2100
657+
triple,
658+
#else
659+
triple.str(),
660+
#endif
661+
cpu, finalFeaturesString,
656662
targetOptions, relocModel, codeModel,
657663
static_cast<llvm::CodeGenOptLevel>(codeGenOptLevel));
658664
}

gen/abi/aarch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ struct AArch64TargetABI : TargetABI {
130130
// compiler magic: pass va_list args implicitly by reference
131131
if (!isReturnVal && isAAPCS64VaList(t)) {
132132
arg.byref = true;
133-
arg.ltype = LLPointerType::getUnqual(arg.ltype);
133+
arg.ltype = LLPointerType::get(getGlobalContext(), 0);
134134
return;
135135
}
136136

gen/abi/generic.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,11 @@ struct IndirectByvalRewrite : ABIRewrite {
260260
auto &attrs = arg.attrs;
261261
attrs.clear();
262262
attrs.addAttribute(LLAttribute::NoAlias);
263+
#if LDC_LLVM_VER >= 2100
264+
attrs.addCapturesAttr(llvm::CaptureInfo::none());
265+
#else
263266
attrs.addAttribute(LLAttribute::NoCapture);
267+
#endif
264268
if (auto alignment = DtoAlignment(arg.type))
265269
attrs.addAlignmentAttr(alignment);
266270
}

0 commit comments

Comments
 (0)