File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ See below for details.
15
15
[ /_ tools/patch_for_go_gem/] ( /_tools/patch_for_go_gem/ )
16
16
17
17
## Usage
18
- ### ` create_go_makefile `
18
+ ### [ ` create_go_makefile ` ] ( https://ruby-go-gem.github.io/go-gem-wrapper/GoGem/Mkmf.html#create_go_makefile-instance_method )
19
19
` create_go_makefile ` is an extension of ` create_makefile ` .
20
20
21
21
Add a task and hacks to build Go against the ` Makefile ` generated by ` create_makefile ` .
@@ -31,9 +31,12 @@ require "go_gem/mkmf" # Append this
31
31
# Use create_go_makefile instead of create_makefile
32
32
# create_makefile("example/example")
33
33
create_go_makefile(" example/example" )
34
+
35
+ # Pass debug flags to `go build`
36
+ create_go_makefile(" example/example" , go_build_args: " -gcflags='all=-N -l'" )
34
37
```
35
38
36
- ### ` GoGem::RakeTask `
39
+ ### [ ` GoGem::RakeTask ` ] ( https://ruby-go-gem.github.io/go-gem-wrapper/GoGem/RakeTask.html )
37
40
Provides rake tasks for ` go test ` with CRuby
38
41
39
42
#### Example (Without config)
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ module GoGem
40
40
# end
41
41
#
42
42
# build_tag = GoGem::Util.ruby_minor_version_build_tag
43
- # sh GoGem::RakeTask.build_env_vars, "golangci-lint run --build-tags #{build_tag}"
43
+ # sh GoGem::RakeTask.build_env_vars, "golangci-lint run --build-tags #{build_tag} --modules-download-mode=readonly "
44
44
# end
45
45
# end
46
46
# end
@@ -112,14 +112,16 @@ def self.build_env_vars
112
112
}
113
113
end
114
114
115
+ # Change current working dir inside `ext/<GEM_NAME>/`
116
+ #
115
117
# @yield
116
118
def within_target_dir
117
119
Dir . chdir ( target_dir ) do # rubocop:disable Style/ExplicitBlockArgument
118
120
yield
119
121
end
120
122
end
121
123
122
- # @return [String]
124
+ # @return [String] ext dir name (e.g.`ext/<GEM_NAME>/`)
123
125
def ext_dir
124
126
File . join ( "ext" , gem_name )
125
127
end
You can’t perform that action at this time.
0 commit comments