Skip to content

Commit 5429804

Browse files
committed
chore:libstatic to staticLib
1 parent 6830aae commit 5429804

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

_cmptest/llcppgend_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func testFrom(t *testing.T, tc testCase, isStatic bool, gen bool) {
176176
cfgPath := filepath.Join(wd, tc.dir, tc.pkg.Name, config.LLCPPG_CFG)
177177
processCfgPath := filepath.Join(resultDir, config.LLCPPG_CFG)
178178

179-
// when isStatic is true, replace the libstatic=False to libstatic=True
179+
// when isStatic is true, replace the staticLib=False to staticLib=True
180180
if !isStatic {
181181
copyFile(cfgPath, processCfgPath)
182182
} else {
@@ -189,7 +189,7 @@ func testFrom(t *testing.T, tc testCase, isStatic bool, gen bool) {
189189
if err != nil {
190190
t.Fatal(err)
191191
}
192-
cfg["libstatic"] = true
192+
cfg["staticLib"] = true
193193
cfgContent, err = json.Marshal(cfg)
194194
if err != nil {
195195
t.Fatal(err)

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type Config struct {
3333
Mix bool `json:"mix,omitempty"`
3434
SymMap map[string]string `json:"symMap,omitempty"`
3535
TypeMap map[string]string `json:"typeMap,omitempty"`
36-
LibStatic bool `json:"libstatic,omitempty"`
36+
StaticLib bool `json:"staticLib,omitempty"`
3737
}
3838

3939
func NewDefault() *Config {

config/config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ func TestGetConfByByte(t *testing.T) {
127127
"cflags": "-I/opt/homebrew/include",
128128
"include": ["mylib.h"],
129129
"libs": "-L/opt/homebrew/lib -lmylib",
130-
"libstatic": true
130+
"staticLib": true
131131
}`,
132132
expect: llconfig.Config{
133133
Name: "mylib",
134134
CFlags: "-I/opt/homebrew/include",
135135
Include: []string{"mylib.h"},
136136
Libs: "-L/opt/homebrew/lib -lmylib",
137-
LibStatic: true,
137+
StaticLib: true,
138138
},
139139
mode: useFile,
140140
},

0 commit comments

Comments
 (0)