-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pam: Introduce pam_debug build tag to generate debug libraries
When using this tag on `go build` or `go generate` we: - Add more debug symbols to built libraries - Enable pedantic checks on data structures used by GDM proto To achieve this, add a further generate_debug.go file that is only used when the `pam_debug` tag is used, this now also builds the gdm code with the `pam_gdm_debug` build tag that implies enabling by default some checks that are not enabled by default. Update CI job to ensure this works.
- Loading branch information
Showing
6 changed files
with
128 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//go:build pam_gdm_debug | ||
|
||
package gdm | ||
|
||
func init() { | ||
checkMembersFunc = checkMembersDebug | ||
validateJSONFunc = validateJSONDebug | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//go:build generate | ||
//go:build generate && !pam_debug | ||
|
||
//go:generate ./generate.sh -tags !pam_binary_cli | ||
//go:generate ./generate.sh -tags "!pam_binary_cli && !pam_debug" | ||
|
||
package main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//go:build generate && pam_debug | ||
|
||
//go:generate env CFLAGS=-g3 CGO_CFLAGS=-g3 ./generate.sh -tags "!pam_binary_cli && pam_debug" -build-tags pam_gdm_debug -output pam_module_debug.go | ||
|
||
package main |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.