docs: update obsolete references to the compiler/ folder

pull/4990/head
Delyan Angelov 2020-05-22 10:11:12 +03:00
parent 7a4f26ac4f
commit 1cc52b0fae
3 changed files with 4 additions and 5 deletions

View File

@ -3,9 +3,8 @@ module main
// / This file will get compiled as a part of the same module, // / This file will get compiled as a part of the same module,
// / in which a given _test.v file is, when v is given -stats argument // / in which a given _test.v file is, when v is given -stats argument
// / The methods defined here are called back by the test program's // / The methods defined here are called back by the test program's
// / main function, generated by compiler/main.v so that customizing the // / main function, so that customizing the look & feel of the results
// / look & feel of the results is easy, since it is done in normal V // / is easy, since it is done in normal V code, instead of in embedded C ...
// / code, instead of in embedded C ...
// ///////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////
import os import os
import benchmark import benchmark

View File

@ -16,7 +16,7 @@ fn v_test_compiler(vargs string) {
parent_dir := os.dir(vexe) parent_dir := os.dir(vexe)
testing.vlib_should_be_present(parent_dir) testing.vlib_should_be_present(parent_dir)
// Changing the current directory is needed for some of the compiler tests, // Changing the current directory is needed for some of the compiler tests,
// compiler/tests/local_test.v and compiler/tests/repl/repl_test.v // vlib/v/tests/local_test.v and vlib/v/tests/repl/repl_test.v
os.chdir(parent_dir) os.chdir(parent_dir)
/* /*
if !os.exists(parent_dir + '/v.v') { if !os.exists(parent_dir + '/v.v') {

View File

@ -1561,7 +1561,7 @@ and tries to compile it to a .o file, then will use that.
This allows you to have C code, that is contained in a V module, so that its distribution is easier. This allows you to have C code, that is contained in a V module, so that its distribution is easier.
You can see a complete example for using C code in a V wrapper module here: You can see a complete example for using C code in a V wrapper module here:
[minimal V project, that has a module, which contains C code](https://github.com/vlang/v/tree/master/vlib/compiler/tests/project_with_c_code) [minimal V project, that has a module, which contains C code](https://github.com/vlang/v/tree/master/vlib/v/tests/project_with_c_code)
You can use `-cflags` to pass custom flags to the backend C compiler. You can also use `-cc` to change the default C backend compiler. You can use `-cflags` to pass custom flags to the backend C compiler. You can also use `-cc` to change the default C backend compiler.
For example: `-cc gcc-9 -cflags -fsanitize=thread`. For example: `-cc gcc-9 -cflags -fsanitize=thread`.