mirror of
https://github.com/dlang/tools.git
synced 2025-04-27 13:40:22 +03:00
Merge remote-tracking branch 'upstream/stable' into merge_stable
This commit is contained in:
commit
3f010a73f6
2 changed files with 22 additions and 2 deletions
1
rdmd.d
1
rdmd.d
|
@ -412,6 +412,7 @@ private string getWorkPath(in string root, in string[] compilerFlags)
|
||||||
if (irrelevantSwitches.canFind(flag)) continue;
|
if (irrelevantSwitches.canFind(flag)) continue;
|
||||||
context.put(flag.representation);
|
context.put(flag.representation);
|
||||||
}
|
}
|
||||||
|
foreach (f; extraFiles) context.put(f.representation);
|
||||||
auto digest = context.finish();
|
auto digest = context.finish();
|
||||||
string hash = toHexString(digest);
|
string hash = toHexString(digest);
|
||||||
|
|
||||||
|
|
23
rdmd_test.d
23
rdmd_test.d
|
@ -446,7 +446,7 @@ void runTests()
|
||||||
/* [REG2.072.0] pragma(lib) is broken with rdmd: https://issues.dlang.org/show_bug.cgi?id=16978 */
|
/* [REG2.072.0] pragma(lib) is broken with rdmd: https://issues.dlang.org/show_bug.cgi?id=16978 */
|
||||||
|
|
||||||
version (linux)
|
version (linux)
|
||||||
{
|
{{
|
||||||
TmpDir srcDir = "rdmdTest";
|
TmpDir srcDir = "rdmdTest";
|
||||||
string libSrcName = srcDir.buildPath("libfun.d");
|
string libSrcName = srcDir.buildPath("libfun.d");
|
||||||
std.file.write(libSrcName, `extern(C) void fun() {}`);
|
std.file.write(libSrcName, `extern(C) void fun() {}`);
|
||||||
|
@ -460,7 +460,7 @@ void runTests()
|
||||||
|
|
||||||
res = execute([rdmdApp, compilerSwitch, "-L-L" ~ srcDir, mainSrcName]);
|
res = execute([rdmdApp, compilerSwitch, "-L-L" ~ srcDir, mainSrcName]);
|
||||||
assert(res.status == 0, res.output);
|
assert(res.status == 0, res.output);
|
||||||
}
|
}}
|
||||||
|
|
||||||
/* https://issues.dlang.org/show_bug.cgi?id=16966 */
|
/* https://issues.dlang.org/show_bug.cgi?id=16966 */
|
||||||
{
|
{
|
||||||
|
@ -473,6 +473,25 @@ void runTests()
|
||||||
assert(exists(voidMainExe));
|
assert(exists(voidMainExe));
|
||||||
remove(voidMainExe);
|
remove(voidMainExe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* https://issues.dlang.org/show_bug.cgi?id=17198 - rdmd does not recompile
|
||||||
|
when --extra-file is added */
|
||||||
|
{
|
||||||
|
TmpDir srcDir = "rdmdTest";
|
||||||
|
immutable string src1 = srcDir.buildPath("test.d");
|
||||||
|
immutable string src2 = srcDir.buildPath("test2.d");
|
||||||
|
std.file.write(src1, "int x = 1; int main() { return x; }");
|
||||||
|
std.file.write(src2, "import test; static this() { x = 0; }");
|
||||||
|
|
||||||
|
res = execute([rdmdApp, compilerSwitch, src1]);
|
||||||
|
assert(res.status == 1, res.output);
|
||||||
|
|
||||||
|
res = execute([rdmdApp, compilerSwitch, "--extra-file=" ~ src2, src1]);
|
||||||
|
assert(res.status == 0, res.output);
|
||||||
|
|
||||||
|
res = execute([rdmdApp, compilerSwitch, src1]);
|
||||||
|
assert(res.status == 1, res.output);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void runConcurrencyTest()
|
void runConcurrencyTest()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue