-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
ldc2.conf: Implement ~=
concatenating operator
#4848
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// RUN: %ldc -o- -v -conf=%S/inputs/appending_assign.conf %s 2>&1 | ||
|
||
module object; | ||
|
||
version(Section1_1) | ||
static assert(false); | ||
version(Section1_2) {} | ||
else static assert(false); | ||
|
||
version(Section2) {} | ||
else static assert(false); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
// RUN: not %ldc -conf=%S/inputs/noswitches.conf %s 2>&1 | FileCheck %s --check-prefix=NOSWITCHES | ||
// NOSWITCHES: Could not look up switches in {{.*}}noswitches.conf | ||
// RUN: %ldc -o- -conf=%S/inputs/noswitches.conf %s 2>&1 | FileCheck %s --check-prefix=NOSWITCHES | ||
// NOSWITCHES: Error while reading config file: {{.*}}noswitches.conf | ||
kinke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// NOSWITCHES-NEXT: Could not look up switches | ||
|
||
// RUN: not %ldc -conf=%S/inputs/section_aaa.conf %s 2>&1 | FileCheck %s --check-prefix=NO_SEC | ||
// NO_SEC: No matching section for triple '{{.*}}' in {{.*}}section_aaa.conf | ||
// RUN: %ldc -o- -conf=%S/inputs/section_aaa.conf %s 2>&1 | FileCheck %s --check-prefix=NO_SEC | ||
// NO_SEC: Error while reading config file: {{.*}}section_aaa.conf | ||
// NO_SEC-NEXT: No matching section for triple '{{.*}}' | ||
|
||
// RUN: %ldc -o- -conf=%S/inputs/invalid_append.conf %s 2>&1 | FileCheck %s --check-prefix=APP | ||
// APP: Error while reading config file: {{.*}}invalid_append.conf | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this added command curiously fails for macOS x86_64. I'm wondering if that has anything to do with 2 |
||
// APP-NEXT: line 3: '~=' is not supported with scalar values | ||
|
||
void foo() | ||
{ | ||
} | ||
module object; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
default: { | ||
switches = [ "-d-version=Section1_1" ] | ||
switches = [ "-d-version=Section1_2" ] | ||
} | ||
|
||
".?": { | ||
switches ~= [ "-d-version=Section2" ] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
default: | ||
{ | ||
rpath ~= "/path"; | ||
} | ||
|
||
default: | ||
{ | ||
switches = []; | ||
post-switches = []; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
[] ~
prefix isn't really needed, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need someway to go from
const(string)[]
tostring[]
..dup
ornewVals ~= a.vals
also works.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to simplified this, and investigate the macOS x86_64 issue a bit in #4856.