-
-
Notifications
You must be signed in to change notification settings - Fork 618
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
Add 'Default', 'Dwarf' and 'SplitDwarf' arguments to 'debugformat' #1067
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,7 +255,10 @@ | |
scope = "config", | ||
kind = "string", | ||
allowed = { | ||
"Default", | ||
"c7", | ||
"Dwarf", | ||
"SplitDwarf", | ||
}, | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,18 @@ | |
end | ||
|
||
|
||
-- | ||
-- Returns string to be appended to -g | ||
-- | ||
function gcc.getdebugformat(cfg) | ||
local flags = { | ||
Default = "", | ||
Dwarf = "dwarf", | ||
SplitDwarf = "split-dwarf", | ||
} | ||
return flags | ||
end | ||
|
||
-- | ||
-- Returns list of C compiler flags for a configuration. | ||
-- | ||
|
@@ -93,9 +105,11 @@ | |
High = "-Wall", | ||
Off = "-w", | ||
}, | ||
symbols = { | ||
On = "-g" | ||
}, | ||
symbols = function(cfg, mappings) | ||
local values = gcc.getdebugformat(cfg) | ||
local debugformat = values[cfg.debugformat] or "" | ||
return { On = "-g" .. debugformat } | ||
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. Is it a supported feature that we return a table from this function? Assuming this works, it should also support 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. Returning a table from this function is to preserve as much of the existing behavior prior to this change as possible. The test for 'function' type and executing the function here is what triggers this logic to take place. 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. Ah. I see what you mean about |
||
end, | ||
unsignedchar = { | ||
On = "-funsigned-char", | ||
Off = "-fno-unsigned-char" | ||
|
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.
What does
-gc7
mean?