github.com/kidsbmilk/gofronted_all@v0.0.0-20220701224323-6479d5976c5d/libgo/README (about) 1 See ../README. 2 3 This is the runtime support library for the Go programming language. 4 This library is intended for use with the Go frontend. 5 6 This library should not be stripped when it is installed. Go code 7 relies on being able to look up file/line information, which comes 8 from the debugging info using the libbacktrace library. 9 10 The library has only been tested on GNU/Linux using glibc, and on 11 Solaris. It should not be difficult to port to other operating 12 systems. 13 14 Directories: 15 16 go 17 A copy of the Go library from http://golang.org/, with several 18 changes for gccgo. 19 20 runtime 21 Runtime functions, written in C, which are called directly by the 22 compiler or by the library. 23 24 Contributing 25 ============ 26 27 To contribute patches to the files in this directory, please see 28 http://golang.org/doc/gccgo_contribute.html . 29 30 The master copy of these files is hosted at 31 http://code.google.com/p/gofrontend . Changes to these files require 32 signing a Google contributor license agreement. If you are the 33 copyright holder, you will need to agree to the individual contributor 34 license agreement at 35 http://code.google.com/legal/individual-cla-v1.0.html. This agreement 36 can be completed online. 37 38 If your organization is the copyright holder, the organization will 39 need to agree to the corporate contributor license agreement at 40 http://code.google.com/legal/corporate-cla-v1.0.html. 41 42 If the copyright holder for your code has already completed the 43 agreement in connection with another Google open source project, it 44 does not need to be completed again. 45 46 Debugging 47 ========= 48 49 This describes how to test libgo when built as part of gccgo. 50 51 To test a specific package, cd to the libgo build directory 52 (TARGET/libgo) and run `make PKG/check`. For example, `make 53 bytes/check`. 54 55 To see the exact commands that it runs, including how the compiler is 56 invoked, run `make GOTESTFLAGS=--trace bytes/check`. This will 57 display the commands if the test fails. If the test passes, the 58 commands and other output will be visible in a file named 59 check-testlog in a subdirectory with the name of the package being 60 checked. In the case of bytes/check, this will create 61 bytes/check-testlog. 62 63 To leave the test program behind, run `make GOTESTFLAGS=--keep 64 bytes/check`. That will leave a gotestNNNN/test directory in the 65 libgo build directory. In that directory you can run 66 `LD_LIBRARY_PATH=../../.libs ./a.out -test.short` to run the tests. 67 You can run specific failing tests using a -test.run option. You can 68 see the tests being run with the -test.v option. You can run the 69 program under a debugger such as gdb.