Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding.iconv: add flag for OpenBSD to find iconv include and library #23575

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

lcheylus
Copy link
Contributor

Fix #23573


Tests for iconv OK on OpenBSD current/amd64 with tcc, egcc and clang

  • Tests with tcc
$ ./v -stats test vlib/encoding/iconv/                                                                                                                                                                    
---- Testing... -----
running tests in: /home/fox/dev/vlang.git/vlib/encoding/iconv/iconv_test.v                                                                                                                                                                                                        
      OK    [1/5]     0.124 ms     8 asserts | main.test_vstring_to_encoding()                                                                                                                                                                                                    
      OK    [2/5]     0.060 ms     8 asserts | main.test_encoding_to_vstring()                                                                                                                                                                                                    
      OK    [3/5]     0.033 ms     5 asserts | main.test_create_utf_string_with_bom()                                                                                                                                                                                             
      OK    [4/5]     0.027 ms     5 asserts | main.test_remove_utf_string_with_bom()
      OK    [5/5]     3.168 ms    30 asserts | main.test_read_file_encoding_write_file_encoding()
     Summary for running V tests in "iconv_test.v": 56 passed, 56 total. Elapsed time: 3 ms.
        V  source  code size:      29427 lines,     794873 bytes,   278 types,    13 modules,   131 files
generated  target  code size:      11673 lines,     447037 bytes
compilation took: 664.205 ms, compilation speed: 44304 vlines/s, cgen threads: 3

 OK     723.901 ms vlib/encoding/iconv/iconv_test.v
-----
  • Tests with gcc (binary = egcc)
$ ./v -cc egcc -stats test vlib/encoding/iconv/
---- Testing... ----
running tests in: /home/fox/dev/vlang.git/vlib/encoding/iconv/iconv_test.v
      OK    [1/5]     0.192 ms     8 asserts | main.test_vstring_to_encoding()
      OK    [2/5]     0.061 ms     8 asserts | main.test_encoding_to_vstring()
      OK    [3/5]     0.082 ms     5 asserts | main.test_create_utf_string_with_bom()
      OK    [4/5]     0.024 ms     5 asserts | main.test_remove_utf_string_with_bom()
      OK    [5/5]     2.673 ms    30 asserts | main.test_read_file_encoding_write_file_encoding()
     Summary for running V tests in "iconv_test.v": 56 passed, 56 total. Elapsed time: 3 ms.
        V  source  code size:      29427 lines,     794873 bytes,   278 types,    13 modules,   131 files
generated  target  code size:      11659 lines,     446835 bytes
compilation took: 2658.985 ms, compilation speed: 11067 vlines/s, cgen threads: 3

 OK    2717.165 ms vlib/encoding/iconv/iconv_test.v
----
  • Tests with cglang
$ ./v -cc clang -stats test vlib/encoding/iconv/
---- Testing... ----
running tests in: /home/fox/dev/vlang.git/vlib/encoding/iconv/iconv_test.v
      OK    [1/5]     0.248 ms     8 asserts | main.test_vstring_to_encoding()
      OK    [2/5]     0.059 ms     8 asserts | main.test_encoding_to_vstring()
      OK    [3/5]     0.176 ms     5 asserts | main.test_create_utf_string_with_bom()
      OK    [4/5]     0.022 ms     5 asserts | main.test_remove_utf_string_with_bom()
      OK    [5/5]     4.773 ms    30 asserts | main.test_read_file_encoding_write_file_encoding()
     Summary for running V tests in "iconv_test.v": 56 passed, 56 total. Elapsed time: 5 ms.
        V  source  code size:      29427 lines,     794873 bytes,   278 types,    13 modules,   131 files
generated  target  code size:      11659 lines,     446835 bytes
compilation took: 1972.469 ms, compilation speed: 14918 vlines/s, cgen threads: 3

 OK    2057.521 ms vlib/encoding/iconv/iconv_test.v
----

Copy link

Connected to Huly®: V_0.6-22001

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@spytheman spytheman merged commit c225e04 into vlang:master Jan 25, 2025
61 of 62 checks passed
@lcheylus lcheylus deleted the openbsd-iconv branch January 25, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

encoding.iconv: unable to find includes and lib on OpenBSD
2 participants