File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -140,17 +140,9 @@ pub fn (mut p Preferences) fill_with_defaults() {
140140 // If you do decide to break it, please *at the very least*, test it
141141 // extensively, and make a PR about it, instead of committing directly
142142 // and breaking the CI, VC, and users doing `v up`.
143- if rpath == '${p.vroot} /cmd/v' && os.is_dir ('vlib/compiler' ) {
144- // Building V? Use v2, since we can't overwrite a running
145- // executable on Windows + the precompiled V is more
146- // optimized.
147- println ('Saving the resulting V executable in `./v2`' )
148- println ('Use `v -o v cmd/v` if you want to replace current ' + 'V executable.' )
149- p.out_name = 'v2'
150- }
151143 }
152- rpath_name := os. file_name (rpath )
153- p.building_v = ! p.is_repl && (rpath_name == 'v' || rpath_name == ' vfmt.v' )
144+ npath := rpath. replace ( ' \\ ' , '/' )
145+ p.building_v = ! p.is_repl && (npath. ends_with ( 'cmd/v' ) || npath. ends_with ( 'cmd/tools/ vfmt.v') )
154146 if p.os == .linux {
155147 $if ! linux {
156148 p.parse_define ('cross_compile' )
You can’t perform that action at this time.
0 commit comments