Skip to content

Commit

Permalink
Try to get a proper build log
Browse files Browse the repository at this point in the history
  • Loading branch information
weiznich committed Nov 10, 2023
1 parent 1116fbc commit 9591bb7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ jobs:
echo "C:\Program Files\PostgreSQL\12\bin" >> $GITHUB_PATH
echo "C:\Program Files\PostgreSQL\12\lib" >> $GITHUB_PATH
echo "PQ_LIB_DIR=C:\Program Files\PostgreSQL\12\lib" >> $GITHUB_ENV
- name: Windows setup (bundled)
if: runner.os == 'Windows' && matrix.features == 'bundled'
shell: bash
run: |
echo "OPENSSL_RUST_USE_NASM=0" >> $GITHUB_ENV
echo OPENSSL_SRC_PERL=C:/Strawberry/perl/bin/perl >> $GITHUB_ENV
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable

Expand All @@ -70,6 +77,7 @@ jobs:
shell: bash
run: |
cargo test --no-default-features --features "${{ matrix.features }}"
- name: Test compile diesel
shell: bash
run: |
Expand Down
7 changes: 7 additions & 0 deletions pq-src/additional_include/pg_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,22 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

// that function does not exist on macos
#ifndef __APPLE__
/* Define to 1 if you have the `strchrnul' function. */
#define HAVE_STRCHRNUL 1
#endif

/* Define to 1 if you have the `strerror_r' function. */
#define HAVE_STRERROR_R 1

// windows does not have that header
#ifndef _WIN32
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

#endif

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

Expand Down
8 changes: 8 additions & 0 deletions pq-src/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::path::PathBuf;

const LIBPORTS: &'static [&'static str] = &[
#[cfg(not(target_os = "macos"))]
"getpeereid.c",
"strlcat.c",
"strlcpy.c",
Expand All @@ -23,6 +24,8 @@ const LIBPORTS: &'static [&'static str] = &[
"strerror.c",
"tar.c",
"thread.c",
#[cfg(target_os = "macos")]
"explicit_bzero.c",
];

const LIBCOMMON: &'static [&'static str] = &[
Expand Down Expand Up @@ -129,6 +132,11 @@ fn main() {
if cfg!(target_os = "linux") {
basic_build.define("_GNU_SOURCE", None);
}
if cfg!(target_os = "macos") {
// something is broken in homebrew
// https://github.com/Homebrew/legacy-homebrew/pull/23620
basic_build.define("_FORTIFY_SOURCE", Some("0"));
}

basic_build
.clone()
Expand Down

0 comments on commit 9591bb7

Please sign in to comment.