Skip to content

Commit

Permalink
Release 0.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Aug 25, 2017
2 parents 6d6f05d + 6f34708 commit 5478c58
Show file tree
Hide file tree
Showing 38 changed files with 524 additions and 192 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Expand Up @@ -2,6 +2,17 @@

All notable changes to the Pony compiler and standard library will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com/).

## [0.18.1] - 2017-08-25

### Fixed

- Don't print capabilities for type params when generating docs ([PR #2184](https://github.com/ponylang/ponyc/pull/2184))

### Added

- DragonFly BSD 4.8 support ([PR #2183](https://github.com/ponylang/ponyc/pull/2183))
- Process monitor async write buffering ([PR #2186](https://github.com/ponylang/ponyc/pull/2186))

## [0.18.0] - 2017-08-19

### Fixed
Expand Down Expand Up @@ -871,5 +882,5 @@ All notable changes to the Pony compiler and standard library will be documented
- When using a package without a package identifier (eg. `use "foo"` as opposed to `use f = "foo"`), a `Main` type in the package will not be imported. This allows all packages to include unit tests that are run from their included `Main` actor without causing name conflicts.
- The `for` sugar now wraps the `next()` call in a try expression that does a `continue` if an error is raised.

error is raised.
an error is raised.

21 changes: 13 additions & 8 deletions Makefile
Expand Up @@ -23,7 +23,12 @@ else
endif

ifeq ($(UNAME_S),FreeBSD)
OSTYPE = freebsd
OSTYPE = bsd
CXX = c++
endif

ifeq ($(UNAME_S),DragonFly)
OSTYPE = bsd
CXX = c++
endif
endif
Expand Down Expand Up @@ -73,7 +78,7 @@ ifdef destdir
endif
endif

ifneq (,$(filter $(OSTYPE), osx freebsd))
ifneq (,$(filter $(OSTYPE), osx bsd))
symlink.flags = -sf
else
symlink.flags = -srf
Expand All @@ -85,7 +90,7 @@ destdir ?= $(prefix)/lib/pony/$(tag)
LIB_EXT ?= a
BUILD_FLAGS = -march=$(arch) -mtune=$(tune) -Werror -Wconversion \
-Wno-sign-conversion -Wextra -Wall
LINKER_FLAGS = -march=$(arch) -mtune=$(tune)
LINKER_FLAGS = -march=$(arch) -mtune=$(tune) -L /usr/local/lib
AR_FLAGS ?= rcs
ALL_CFLAGS = -std=gnu11 -fexceptions \
-DPONY_VERSION=\"$(tag)\" -DLLVM_VERSION=\"$(llvm_version)\" \
Expand Down Expand Up @@ -155,7 +160,7 @@ ifeq ($(config),release)
AR_FLAGS += --plugin $(LTO_PLUGIN)
endif

ifneq (,$(filter $(OSTYPE),linux freebsd))
ifneq (,$(filter $(OSTYPE),linux bsd))
LINKER_FLAGS += -fuse-linker-plugin -fuse-ld=gold
endif
endif
Expand Down Expand Up @@ -302,7 +307,7 @@ ifneq ($(OSTYPE),linux)
endif

ifneq ($(OSTYPE),osx)
ifneq ($(OSTYPE),freebsd)
ifneq ($(OSTYPE),bsd)
libponyrt.except += src/libponyrt/asio/kqueue.c
endif
endif
Expand Down Expand Up @@ -353,7 +358,7 @@ llvm.include :=
endif
llvm.libs := $(shell $(LLVM_CONFIG) --libs) -lz -lncurses

ifeq ($(OSTYPE), freebsd)
ifeq ($(OSTYPE), bsd)
llvm.libs += -lpthread -lexecinfo
endif

Expand Down Expand Up @@ -397,7 +402,7 @@ ponyc.include := -I src/common/ -I src/libponyrt/ $(llvm.include)
libgtest.include := -isystem lib/gtest/
libgbenchmark.include := -isystem lib/gbenchmark/include/

ifneq (,$(filter $(OSTYPE), osx freebsd))
ifneq (,$(filter $(OSTYPE), osx bsd))
libponyrt.include += -I /usr/local/include
endif

Expand Down Expand Up @@ -475,7 +480,7 @@ ifeq ($(OSTYPE),linux)
libponyrt.benchmarks.links += libpthread libdl libatomic
endif

ifeq ($(OSTYPE),freebsd)
ifeq ($(OSTYPE),bsd)
libponyc.tests.links += libpthread
libponyrt.tests.links += libpthread
libponyc.benchmarks.links += libpthread
Expand Down
19 changes: 19 additions & 0 deletions README.md
Expand Up @@ -519,6 +519,25 @@ make
./helloworld
```

## Building on DragonFly

Dragonfly has been tested on 64-bit X86 DragonFly 4.8.

First, install the required dependencies:

```bash
sudo pkg install gmake
sudo pkg install llvm38
sudo pkg install pcre2
```

This will build ponyc and compile helloworld:

```bash
gmake
./build/release/ponyc examples/helloworld
```

## Building on FreeBSD

First, install the required dependencies:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.18.0
0.18.1
2 changes: 1 addition & 1 deletion lib/gbenchmark/src/internal_macros.h
Expand Up @@ -34,7 +34,7 @@
// that it is an apple system.
#define BENCHMARK_OS_MACOSX 1
#elif defined(__FreeBSD__)
#define BENCHMARK_OS_FREEBSD 1
#define BENCHMARK_OS_BSD 1
#elif defined(__linux__)
#define BENCHMARK_OS_LINUX 1
#endif
Expand Down
4 changes: 2 additions & 2 deletions lib/gbenchmark/src/sysinfo.cc
Expand Up @@ -25,7 +25,7 @@
#include <sys/time.h>
#include <sys/types.h> // this header must be included before 'sys/sysctl.h' to avoid compilation error on FreeBSD
#include <unistd.h>
#if defined BENCHMARK_OS_FREEBSD || defined BENCHMARK_OS_MACOSX
#if defined BENCHMARK_OS_BSD || defined BENCHMARK_OS_MACOSX
#include <sys/sysctl.h>
#endif
#endif
Expand Down Expand Up @@ -228,7 +228,7 @@ void InitializeSystemInfo() {
cpuinfo_num_cpus = num_cpus;
}

#elif defined BENCHMARK_OS_FREEBSD
#elif defined BENCHMARK_OS_BSD
// For this sysctl to work, the machine must be configured without
// SMP, APIC, or APM support. hz should be 64-bit in freebsd 7.0
// and later. Before that, it's a 32-bit quantity (and gives the
Expand Down
2 changes: 1 addition & 1 deletion lib/gbenchmark/src/timers.cc
Expand Up @@ -25,7 +25,7 @@
#include <sys/time.h>
#include <sys/types.h> // this header must be included before 'sys/sysctl.h' to avoid compilation error on FreeBSD
#include <unistd.h>
#if defined BENCHMARK_OS_FREEBSD || defined BENCHMARK_OS_MACOSX
#if defined BENCHMARK_OS_BSD || defined BENCHMARK_OS_MACOSX
#include <sys/sysctl.h>
#endif
#if defined(BENCHMARK_OS_MACOSX)
Expand Down
4 changes: 3 additions & 1 deletion packages/builtin/platform.pony
@@ -1,8 +1,10 @@
primitive Platform
fun bsd(): Bool => freebsd() or dragonfly()
fun freebsd(): Bool => compile_intrinsic
fun dragonfly(): Bool => compile_intrinsic
fun linux(): Bool => compile_intrinsic
fun osx(): Bool => compile_intrinsic
fun posix(): Bool => freebsd() or linux() or osx()
fun posix(): Bool => bsd() or linux() or osx()
fun windows(): Bool => compile_intrinsic

fun x86(): Bool => compile_intrinsic
Expand Down
24 changes: 12 additions & 12 deletions packages/files/directory.pony
Expand Up @@ -92,7 +92,7 @@ class Directory
end

let h =
ifdef linux or freebsd then
ifdef linux or bsd then
let fd =
@openat[I32](fd', ".".cstring(),
@ponyint_o_rdonly()
Expand Down Expand Up @@ -152,7 +152,7 @@ class Directory

let path' = FilePath(path, target, path.caps)?

ifdef linux or freebsd then
ifdef linux or bsd then
let fd' =
@openat[I32](_fd, target.cstring(),
@ponyint_o_rdonly()
Expand All @@ -179,7 +179,7 @@ class Directory
try
let path' = FilePath(path, target, path.caps)?

ifdef linux or freebsd then
ifdef linux or bsd then
var offset: ISize = 0

repeat
Expand Down Expand Up @@ -218,7 +218,7 @@ class Directory

let path' = FilePath(path, target, path.caps)?

ifdef linux or freebsd then
ifdef linux or bsd then
let fd' =
@openat[I32](_fd, target.cstring(),
@ponyint_o_rdwr()
Expand All @@ -243,7 +243,7 @@ class Directory

let path' = FilePath(path, target, path.caps - FileWrite)?

ifdef linux or freebsd then
ifdef linux or bsd then
let fd' =
@openat[I32](_fd, target.cstring(),
@ponyint_o_rdonly() or @ponyint_o_cloexec(),
Expand Down Expand Up @@ -299,7 +299,7 @@ class Directory

let path' = FilePath(path, target, path.caps)?

ifdef linux or freebsd then
ifdef linux or bsd then
FileInfo._relative(_fd, path', target)?
else
FileInfo(path')?
Expand All @@ -320,7 +320,7 @@ class Directory
try
let path' = FilePath(path, target, path.caps)?

ifdef linux or freebsd then
ifdef linux or bsd then
0 == @fchmodat[I32](_fd, target.cstring(), mode._os(), I32(0))
else
path'.chmod(mode)
Expand All @@ -344,7 +344,7 @@ class Directory
try
let path' = FilePath(path, target, path.caps)?

ifdef linux or freebsd then
ifdef linux or bsd then
0 == @fchownat[I32](_fd, target.cstring(), uid, gid, I32(0))
else
path'.chown(uid, gid)
Expand Down Expand Up @@ -380,7 +380,7 @@ class Directory
try
let path' = FilePath(path, target, path.caps)?

ifdef linux or freebsd then
ifdef linux or bsd then
var tv: (ILong, ILong, ILong, ILong) =
( atime._1.ilong(), atime._2.ilong() / 1000,
mtime._1.ilong(), mtime._2.ilong() / 1000 )
Expand Down Expand Up @@ -411,7 +411,7 @@ class Directory
try
let path' = FilePath(path, link_name, path.caps)?

ifdef linux or freebsd then
ifdef linux or bsd then
0 == @symlinkat[I32](source.path.cstring(), _fd, link_name.cstring())
else
source.symlink(path')
Expand All @@ -436,7 +436,7 @@ class Directory
try
let path' = FilePath(path, target, path.caps)?

ifdef linux or freebsd then
ifdef linux or bsd then
let fi = FileInfo(path')?

if fi.directory and not fi.symlink then
Expand Down Expand Up @@ -479,7 +479,7 @@ class Directory
let path' = FilePath(path, source, path.caps)?
let path'' = FilePath(to.path, target, to.path.caps)?

ifdef linux or freebsd then
ifdef linux or bsd then
0 == @renameat[I32](_fd, source.cstring(), to._fd, target.cstring())
else
path'.rename(path'')
Expand Down
4 changes: 2 additions & 2 deletions packages/net/_test.pony
Expand Up @@ -26,13 +26,13 @@ class _TestPing is UDPNotify
(_, let service) = ip.name()?

let list = if ip.ip4() then
ifdef freebsd then
ifdef bsd then
DNS.ip4(auth, "", service)
else
DNS.broadcast_ip4(auth, service)
end
else
ifdef freebsd then
ifdef bsd then
DNS.ip6(auth, "", service)
else
DNS.broadcast_ip6(auth, service)
Expand Down

0 comments on commit 5478c58

Please sign in to comment.